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.
This commit is contained in:
parent
831291e5dd
commit
e49f7fc1f7
1 changed files with 2 additions and 7 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue