From 22f15ab00fc3ebe39a10ece6242ec4dcdfc52529 Mon Sep 17 00:00:00 2001 From: huangxin Date: Wed, 22 Jun 2022 14:59:52 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E4=BF=AE=E6=94=B9=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=202.=20=E4=BF=AE=E6=94=B9JSON?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- srcs/libs/config/agent.cfg | 5 +++-- srcs/pppoe/vcpe_pppoe.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/srcs/libs/config/agent.cfg b/srcs/libs/config/agent.cfg index 3856ac5..990ec9a 100644 --- a/srcs/libs/config/agent.cfg +++ b/srcs/libs/config/agent.cfg @@ -45,7 +45,7 @@ application: zero_mq: { svr_port = 6278; # ZeroMQ 服务器端口 - agent_addr = "ipc:///tmp/msg_fifo1"; # 消息通道路径 + agent_addr = "ipc:///tmp/msg_fifo0"; # 消息通道路径 }; # vxlan 相关 @@ -55,7 +55,8 @@ application: nic = "ens36"; # vxlan 物理网卡名称 peer_ip = "192.168.20.112"; # vxlan 对端IP peer_mac = "00:0C:29:49:CB:27"; # vxlan 对端 MAC 地址 - pkg_filter = "udp port 4789 and ether src not 00:0c:29:07:cb:55"; # 包过滤器 + pkg_filter = "(udp port 4789) and (ether src not 00:0c:29:07:cb:55)"; # 包过滤器 +# pkg_filter = "(pppoed || pppoes || arp || icmp || port domain || (udp and (port 67 or port 68))) && inbound"; }; # vcpe 本地服务网络接口配置 diff --git a/srcs/pppoe/vcpe_pppoe.c b/srcs/pppoe/vcpe_pppoe.c index e94876a..21dbd4d 100644 --- a/srcs/pppoe/vcpe_pppoe.c +++ b/srcs/pppoe/vcpe_pppoe.c @@ -289,7 +289,7 @@ _Noreturn void cacheCalcCb(void *UNUSED(pArg)) { } uv_rwlock_wrunlock(&g_cacheLock); cJSON_AddItemToObject(pRoot, "params", pSession); - pJsonString = cJSON_Print(pRoot); + pJsonString = cJSON_PrintUnformatted(pRoot); mq_data_send_msg(pJsonString); cJSON_Delete(pRoot); free((void *)pJsonString); @@ -317,7 +317,7 @@ _Noreturn void cacheCalcCb(void *UNUSED(pArg)) { } uv_rwlock_wrunlock(&g_cacheLock); cJSON_AddItemToObject(pRoot, "params", pSession); - pJsonString = cJSON_Print(pRoot); + pJsonString = cJSON_PrintUnformatted(pRoot); mq_data_send_msg(pJsonString); cJSON_Delete(pRoot); free((void *)pJsonString);