summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/ipv4ll-network.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-04-07 09:12:59 +0200
committerTom Gundersen <teg@jklm.no>2014-04-07 09:13:02 +0200
commit463b73e24eb51fb787ccc033b47a35a780dec245 (patch)
treeb44c693b37110d9ea5fdff1e031337cbedae48ab /src/libsystemd-network/ipv4ll-network.c
parent7429b07f822348dc5a87208ce107f5f6bf02656d (diff)
sd-ipv4ll: fix packet broadcasting
Umut said: 'I have noticed a bug that we are sending PROBE/ANNOUNCE messages on 00:00:00:00:00:00 address where it should be broadcast.'
Diffstat (limited to 'src/libsystemd-network/ipv4ll-network.c')
-rw-r--r--src/libsystemd-network/ipv4ll-network.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd-network/ipv4ll-network.c b/src/libsystemd-network/ipv4ll-network.c
index 1ebf4ac817..9525408de9 100644
--- a/src/libsystemd-network/ipv4ll-network.c
+++ b/src/libsystemd-network/ipv4ll-network.c
@@ -43,9 +43,10 @@ int arp_network_bind_raw_socket(int index, union sockaddr_union *link) {
return -errno;
link->ll.sll_family = AF_PACKET;
- link->ll.sll_ifindex = index;
link->ll.sll_protocol = htons(ETH_P_ARP);
+ link->ll.sll_ifindex = index;
link->ll.sll_halen = ETH_ALEN;
+ memset(link->ll.sll_addr, 0xff, ETH_ALEN);
if (bind(s, &link->sa, sizeof(link->ll)) < 0) {
safe_close(s);