parent
cfa665e9b6
commit
78e1d2ba55
|
@ -330,6 +330,21 @@ static err_t netif_input_data(struct pbuf *p, struct netif *inp) {
|
||||||
|
|
||||||
if (ebuf == NULL) {
|
if (ebuf == NULL) {
|
||||||
return ERR_IF;
|
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) {
|
if ((err = pContext->session.nicif->input(ebuf, pContext->session.nicif)) != ERR_OK) {
|
||||||
|
|
|
@ -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());
|
g_rawSocketIf = bind_pcap_if(config_get_vxlan_nic_name(), config_get_vxlan_pkg_filter(), cfg_get_support_vxlan());
|
||||||
|
|
||||||
if (g_rawSocketIf) {
|
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 {
|
} else {
|
||||||
dzlog_info("Create Raw Socket error: <%p>\n", (void *)g_rawSocketIf);
|
dzlog_info("Create hardware error: <%p>\n", (void *)g_rawSocketIf);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 启动Session状态机线程
|
// 启动Session状态机线程
|
||||||
|
|
|
@ -20,7 +20,7 @@ void user_info_init() {
|
||||||
uv_rwlock_init(&g_userLock);
|
uv_rwlock_init(&g_userLock);
|
||||||
|
|
||||||
user_info_add(0, &g_userInfo[0]);
|
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(2, &g_userInfo[2]);
|
||||||
//user_info_add(3, &g_userInfo[3]);
|
//user_info_add(3, &g_userInfo[3]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue