diff --git a/dhcp_tools/uv_rawsocket.c b/dhcp_tools/uv_rawsocket.c index 22554c6..4d66545 100644 --- a/dhcp_tools/uv_rawsocket.c +++ b/dhcp_tools/uv_rawsocket.c @@ -311,11 +311,7 @@ int dhcp_tools_init_network(const char *pNicName) { return ERR_SUCCESS; } -#if VLAN_SUPPORT init_filter("vlan or (udp and dst port 68)"); -#else - init_filter("udp and dst port 68"); -#endif ret = create_udp_raw_socket(g_pNicName); if (ret != ERR_SUCCESS) { diff --git a/srcs/libs/include/network/vlan.h b/srcs/libs/include/network/vlan.h index 891c888..a966410 100644 --- a/srcs/libs/include/network/vlan.h +++ b/srcs/libs/include/network/vlan.h @@ -13,8 +13,6 @@ extern "C" { #include #include "common.h" -#define VLAN_SUPPORT (1) - #pragma pack(push) #pragma pack(1) @@ -27,19 +25,15 @@ typedef enum { } VLAN_TYPE; typedef struct vlan_hdr { -#if VLAN_SUPPORT U16 id; U16 type; -#endif } VLAN_HDR, *PVLAN_HDR; typedef struct vlan_hdr2 { -#if VLAN_SUPPORT U16 id1; U16 h_type; U16 id2; U16 type; -#endif } VLAN_HDR2, *PVLAN_HDR2; VLAN_TYPE get_package_vlan_type(void *pBuf);