You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
609 B
14 lines
609 B
diff -up dhcp-4.2.5/common/lpf.c.vlan dhcp-4.2.5/common/lpf.c |
|
--- dhcp-4.2.5/common/lpf.c.vlan 2015-10-13 18:48:35.180447618 +0200 |
|
+++ dhcp-4.2.5/common/lpf.c 2015-10-13 18:51:29.797079032 +0200 |
|
@@ -521,6 +521,10 @@ ssize_t receive_packet (interface, buf, |
|
if (cmsg->cmsg_level == SOL_PACKET && |
|
cmsg->cmsg_type == PACKET_AUXDATA) { |
|
struct tpacket_auxdata *aux = (void *)CMSG_DATA(cmsg); |
|
+ /* Discard packets with stripped vlan id */ |
|
+ /* VLAN ID is only bottom 12-bits of TCI */ |
|
+ if (aux->tp_vlan_tci & 0x0fff) |
|
+ return 0; |
|
nocsum = aux->tp_status & TP_STATUS_CSUMNOTREADY; |
|
} |
|
}
|
|
|