diff options
-rw-r--r-- | networking/udhcp/dhcpc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index ee19f5578..bdb1e2b9b 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -979,6 +979,10 @@ static int udhcp_raw_socket(int ifindex) | |||
979 | log1("Opening raw socket on ifindex %d", ifindex); //log2? | 979 | log1("Opening raw socket on ifindex %d", ifindex); //log2? |
980 | 980 | ||
981 | fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); | 981 | fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); |
982 | /* ^^^^^ | ||
983 | * SOCK_DGRAM: remove link-layer headers on input (SOCK_RAW keeps them) | ||
984 | * ETH_P_IP: want to receive only packets with IPv4 eth type | ||
985 | */ | ||
982 | log1("Got raw socket fd"); //log2? | 986 | log1("Got raw socket fd"); //log2? |
983 | 987 | ||
984 | sock.sll_family = AF_PACKET; | 988 | sock.sll_family = AF_PACKET; |
@@ -1005,8 +1009,6 @@ static int udhcp_raw_socket(int ifindex) | |||
1005 | * | 1009 | * |
1006 | * Copyright: 2006, 2007 Stefan Rompf <sux@loplof.de>. | 1010 | * Copyright: 2006, 2007 Stefan Rompf <sux@loplof.de>. |
1007 | * License: GPL v2. | 1011 | * License: GPL v2. |
1008 | * | ||
1009 | * TODO: make conditional? | ||
1010 | */ | 1012 | */ |
1011 | static const struct sock_filter filter_instr[] = { | 1013 | static const struct sock_filter filter_instr[] = { |
1012 | /* load 9th byte (protocol) */ | 1014 | /* load 9th byte (protocol) */ |