diff --git a/srcs/lwip/src/arch_linux/netif/pcapif.c b/srcs/lwip/src/arch_linux/netif/pcapif.c index d19afb8..e66a603 100644 --- a/srcs/lwip/src/arch_linux/netif/pcapif.c +++ b/srcs/lwip/src/arch_linux/netif/pcapif.c @@ -330,6 +330,21 @@ static err_t netif_input_data(struct pbuf *p, struct netif *inp) { if (ebuf == NULL) { return ERR_IF; + } else { + struct eth_hdr* eth = (struct eth_hdr*)ebuf->payload; + + if(strlen(pContext->session.data.svrBaseMac) == 0) { + if (strlen(pContext->session.data.svrBaseMac) == 0) { + sprintf(pContext->session.data.svrBaseMac, + "%02X:%02X:%02X:%02X:%02X:%02X", + eth->src.addr[0], + eth->src.addr[1], + eth->src.addr[2], + eth->src.addr[3], + eth->src.addr[4], + eth->src.addr[5]); + } + } } if ((err = pContext->session.nicif->input(ebuf, pContext->session.nicif)) != ERR_OK) { diff --git a/srcs/pppoe/vcpe_pppoe.c b/srcs/pppoe/vcpe_pppoe.c index 3d6325f..7a02110 100644 --- a/srcs/pppoe/vcpe_pppoe.c +++ b/srcs/pppoe/vcpe_pppoe.c @@ -263,9 +263,9 @@ int pppoe_session_init() { g_rawSocketIf = bind_pcap_if(config_get_vxlan_nic_name(), config_get_vxlan_pkg_filter(), cfg_get_support_vxlan()); if (g_rawSocketIf) { - dzlog_info("Create Raw Socket netif: <%p>\n", (void *)g_rawSocketIf); + dzlog_info("Create hardware netif: <%p>\n", (void *)g_rawSocketIf); } else { - dzlog_info("Create Raw Socket error: <%p>\n", (void *)g_rawSocketIf); + dzlog_info("Create hardware error: <%p>\n", (void *)g_rawSocketIf); } // 启动Session状态机线程 diff --git a/srcs/user/user_info.c b/srcs/user/user_info.c index 3a2b606..f39bc31 100644 --- a/srcs/user/user_info.c +++ b/srcs/user/user_info.c @@ -20,7 +20,7 @@ void user_info_init() { uv_rwlock_init(&g_userLock); user_info_add(0, &g_userInfo[0]); - user_info_add(1, &g_userInfo[1]); + //user_info_add(1, &g_userInfo[1]); //user_info_add(2, &g_userInfo[2]); //user_info_add(3, &g_userInfo[3]); }