diff options
Diffstat (limited to 'networking/udhcp/clientsocket.c')
-rw-r--r-- | networking/udhcp/clientsocket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/udhcp/clientsocket.c b/networking/udhcp/clientsocket.c index 1dcc10570..851d5ab5f 100644 --- a/networking/udhcp/clientsocket.c +++ b/networking/udhcp/clientsocket.c | |||
@@ -85,24 +85,24 @@ int FAST_FUNC udhcp_raw_socket(int ifindex) | |||
85 | .filter = (struct sock_filter *) filter_instr, | 85 | .filter = (struct sock_filter *) filter_instr, |
86 | }; | 86 | }; |
87 | 87 | ||
88 | DEBUG("opening raw socket on ifindex %d", ifindex); | 88 | log1("Opening raw socket on ifindex %d", ifindex); //log2? |
89 | 89 | ||
90 | fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); | 90 | fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); |
91 | DEBUG("got raw socket fd %d", fd); | 91 | log1("Got raw socket fd %d", fd); //log2? |
92 | 92 | ||
93 | if (SERVER_PORT == 67 && CLIENT_PORT == 68) { | 93 | if (SERVER_PORT == 67 && CLIENT_PORT == 68) { |
94 | /* Use only if standard ports are in use */ | 94 | /* Use only if standard ports are in use */ |
95 | /* Ignoring error (kernel may lack support for this) */ | 95 | /* Ignoring error (kernel may lack support for this) */ |
96 | if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter_prog, | 96 | if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter_prog, |
97 | sizeof(filter_prog)) >= 0) | 97 | sizeof(filter_prog)) >= 0) |
98 | DEBUG("attached filter to raw socket fd %d", fd); | 98 | log1("Attached filter to raw socket fd %d", fd); // log? |
99 | } | 99 | } |
100 | 100 | ||
101 | sock.sll_family = AF_PACKET; | 101 | sock.sll_family = AF_PACKET; |
102 | sock.sll_protocol = htons(ETH_P_IP); | 102 | sock.sll_protocol = htons(ETH_P_IP); |
103 | sock.sll_ifindex = ifindex; | 103 | sock.sll_ifindex = ifindex; |
104 | xbind(fd, (struct sockaddr *) &sock, sizeof(sock)); | 104 | xbind(fd, (struct sockaddr *) &sock, sizeof(sock)); |
105 | DEBUG("bound to raw socket fd %d", fd); | 105 | log1("Created raw socket"); |
106 | 106 | ||
107 | return fd; | 107 | return fd; |
108 | } | 108 | } |