aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2015-10-13 14:45:51 +0100
committerRon Yorston <rmy@pobox.com>2015-10-13 14:45:51 +0100
commit8e509f11bceeec419abc718300bef7422d1fee4c (patch)
treefdfbc752ad94102e3613a5d7254f14a93eaf7f56 /networking/udhcp/dhcpc.c
parent420f5edfe7676fe6e7cddbbf15c04649d096e422 (diff)
parent4d0c1ea4784c9844f8468d97ca5c26d3c70f9921 (diff)
downloadbusybox-w32-8e509f11bceeec419abc718300bef7422d1fee4c.tar.gz
busybox-w32-8e509f11bceeec419abc718300bef7422d1fee4c.tar.bz2
busybox-w32-8e509f11bceeec419abc718300bef7422d1fee4c.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 811a1a1ee..915f65935 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -29,6 +29,20 @@
29#include <linux/filter.h> 29#include <linux/filter.h>
30#include <linux/if_packet.h> 30#include <linux/if_packet.h>
31 31
32#ifndef PACKET_AUXDATA
33# define PACKET_AUXDATA 8
34struct tpacket_auxdata {
35 uint32_t tp_status;
36 uint32_t tp_len;
37 uint32_t tp_snaplen;
38 uint16_t tp_mac;
39 uint16_t tp_net;
40 uint16_t tp_vlan_tci;
41 uint16_t tp_padding;
42};
43#endif
44
45
32/* "struct client_config_t client_config" is in bb_common_bufsiz1 */ 46/* "struct client_config_t client_config" is in bb_common_bufsiz1 */
33 47
34 48
@@ -1043,9 +1057,7 @@ static int udhcp_raw_socket(int ifindex)
1043 } 1057 }
1044#endif 1058#endif
1045 1059
1046 if (setsockopt(fd, SOL_PACKET, PACKET_AUXDATA, 1060 if (setsockopt_1(fd, SOL_PACKET, PACKET_AUXDATA) != 0) {
1047 &const_int_1, sizeof(int)) < 0
1048 ) {
1049 if (errno != ENOPROTOOPT) 1061 if (errno != ENOPROTOOPT)
1050 log1("Can't set PACKET_AUXDATA on raw socket"); 1062 log1("Can't set PACKET_AUXDATA on raw socket");
1051 } 1063 }