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:
cinap_lenrek 2018-08-11 16:18:12 +02:00
parent 831291e5dd
commit e49f7fc1f7

View file

@ -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 */