From e49f7fc1f7435de94a632fea0dc7753b58570eb8 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sat, 11 Aug 2018 16:18:12 +0200 Subject: [PATCH] devip: fix multicastarp() when ipconfig assigned the 0 address sending multicast was broken when ipconfig assigned the 0 address for dhcp as they would wrongly classified as Runi. this could happen when we do slaac and dhcp in parallel, breaking the sending of router solicitations. --- sys/src/9/ip/ethermedium.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/src/9/ip/ethermedium.c b/sys/src/9/ip/ethermedium.c index 6471355c1..3602da1b8 100644 --- a/sys/src/9/ip/ethermedium.c +++ b/sys/src/9/ip/ethermedium.c @@ -717,14 +717,9 @@ static Block* multicastarp(Fs *f, Arpent *a, Medium *medium, uchar *mac) { /* is it broadcast? */ - switch(ipforme(f, a->ip)){ - case Runi: - return nil; - case Rbcast: - memset(mac, 0xff, 6); + if(ipforme(f, a->ip) == Rbcast){ + memset(mac, 0xff, medium->maclen); return arpresolve(f->arp, a, medium, mac); - default: - break; } /* if multicast, fill in mac */