diff options
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r-- | networking/udhcp/dhcpc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index 1a66c610e..ccf04993d 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -1001,14 +1001,14 @@ static int udhcp_raw_socket(int ifindex) | |||
1001 | int fd; | 1001 | int fd; |
1002 | struct sockaddr_ll sock; | 1002 | struct sockaddr_ll sock; |
1003 | 1003 | ||
1004 | log1("opening raw socket on ifindex %d", ifindex); //log2? | 1004 | log2("opening raw socket on ifindex %d", ifindex); |
1005 | 1005 | ||
1006 | fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); | 1006 | fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); |
1007 | /* ^^^^^ | 1007 | /* ^^^^^ |
1008 | * SOCK_DGRAM: remove link-layer headers on input (SOCK_RAW keeps them) | 1008 | * SOCK_DGRAM: remove link-layer headers on input (SOCK_RAW keeps them) |
1009 | * ETH_P_IP: want to receive only packets with IPv4 eth type | 1009 | * ETH_P_IP: want to receive only packets with IPv4 eth type |
1010 | */ | 1010 | */ |
1011 | log1("got raw socket fd"); //log2? | 1011 | log2("got raw socket fd"); |
1012 | 1012 | ||
1013 | sock.sll_family = AF_PACKET; | 1013 | sock.sll_family = AF_PACKET; |
1014 | sock.sll_protocol = htons(ETH_P_IP); | 1014 | sock.sll_protocol = htons(ETH_P_IP); |
@@ -1455,7 +1455,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
1455 | retval = 0; | 1455 | retval = 0; |
1456 | /* If we already timed out, fall through with retval = 0, else... */ | 1456 | /* If we already timed out, fall through with retval = 0, else... */ |
1457 | if (tv > 0) { | 1457 | if (tv > 0) { |
1458 | log1("waiting on select %u seconds", tv); | 1458 | log1("waiting %u seconds", tv); |
1459 | timestamp_before_wait = (unsigned)monotonic_sec(); | 1459 | timestamp_before_wait = (unsigned)monotonic_sec(); |
1460 | retval = poll(pfds, 2, tv < INT_MAX/1000 ? tv * 1000 : INT_MAX); | 1460 | retval = poll(pfds, 2, tv < INT_MAX/1000 ? tv * 1000 : INT_MAX); |
1461 | if (retval < 0) { | 1461 | if (retval < 0) { |
@@ -1465,7 +1465,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
1465 | continue; | 1465 | continue; |
1466 | } | 1466 | } |
1467 | /* Else: an error occurred, panic! */ | 1467 | /* Else: an error occurred, panic! */ |
1468 | bb_perror_msg_and_die("select"); | 1468 | bb_perror_msg_and_die("poll"); |
1469 | } | 1469 | } |
1470 | } | 1470 | } |
1471 | 1471 | ||