summaryrefslogtreecommitdiff
path: root/src/libsystemd-dhcp/dhcp-network.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-dhcp/dhcp-network.c')
-rw-r--r--src/libsystemd-dhcp/dhcp-network.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsystemd-dhcp/dhcp-network.c b/src/libsystemd-dhcp/dhcp-network.c
index 6c9d4ef999..934e8bf13e 100644
--- a/src/libsystemd-dhcp/dhcp-network.c
+++ b/src/libsystemd-dhcp/dhcp-network.c
@@ -32,7 +32,7 @@
int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link)
{
- int s;
+ int s, one = 1;
assert(index > 0);
assert(link);
@@ -48,6 +48,9 @@ int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link)
link->ll.sll_halen = ETH_ALEN;
memset(link->ll.sll_addr, 0xff, ETH_ALEN);
+ if (setsockopt (s, SOL_PACKET, PACKET_AUXDATA, &one, sizeof(one)) < 0)
+ return -errno;
+
if (bind(s, &link->sa, sizeof(link->ll)) < 0) {
close_nointr_nofail(s);
return -errno;