summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-08-11 16:18:12 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2018-08-11 16:18:12 +0200
commite49f7fc1f7435de94a632fea0dc7753b58570eb8 (patch)
treeec8598e65ff2c728ad8e52b4499faf6653a41aab
parent831291e5dd0877cc130f168a487531fd4a8c410b (diff)
downloadplan9front-e49f7fc1f7435de94a632fea0dc7753b58570eb8.tar.xz
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.
-rw-r--r--sys/src/9/ip/ethermedium.c9
1 files 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 */