[systemd-commits] src/libsystemd-network

Tom Gundersen tomegun at kemper.freedesktop.org
Mon Apr 7 00:15:01 PDT 2014


 src/libsystemd-network/ipv4ll-network.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 463b73e24eb51fb787ccc033b47a35a780dec245
Author: Tom Gundersen <teg at jklm.no>
Date:   Mon Apr 7 09:12:59 2014 +0200

    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.'

diff --git a/src/libsystemd-network/ipv4ll-network.c b/src/libsystemd-network/ipv4ll-network.c
index 1ebf4ac..9525408 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);



More information about the systemd-commits mailing list