summaryrefslogtreecommitdiff
path: root/sys/src/9/ip/ethermedium.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-03-18 07:53:10 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2018-03-18 07:53:10 +0100
commit20cbb88e32ece30dd984ab658c365f574790d6ba (patch)
tree42640e5fbd20482cddacd63f3824fbfbb58cdb0c /sys/src/9/ip/ethermedium.c
parent87df80019e3676583f2d60d500179ddcfabab584 (diff)
parent71f807873b43a4d2a2e2c9d1acbe1d97b5fdf18c (diff)
merge
Diffstat (limited to 'sys/src/9/ip/ethermedium.c')
-rw-r--r--sys/src/9/ip/ethermedium.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/src/9/ip/ethermedium.c b/sys/src/9/ip/ethermedium.c
index 346093795..d8691b0e7 100644
--- a/sys/src/9/ip/ethermedium.c
+++ b/sys/src/9/ip/ethermedium.c
@@ -477,7 +477,7 @@ sendarp(Ipifc *ifc, Arpent *a)
memset(bp->rp, 0, n);
e = (Etherarp*)bp->rp;
memmove(e->tpa, a->ip+IPv4off, sizeof(e->tpa));
- ipv4local(ifc, e->spa);
+ ipv4local(ifc, e->spa, e->tpa);
memmove(e->sha, ifc->mac, sizeof(e->sha));
memset(e->d, 0xff, sizeof(e->d)); /* ethernet broadcast */
memmove(e->s, ifc->mac, sizeof(e->s));
@@ -496,7 +496,6 @@ sendarp(Ipifc *ifc, Arpent *a)
static void
resolveaddr6(Ipifc *ifc, Arpent *a)
{
- int sflag;
Block *bp;
Etherrock *er = ifc->arg;
uchar ipsrc[IPaddrlen];
@@ -526,8 +525,8 @@ resolveaddr6(Ipifc *ifc, Arpent *a)
a->rxtsrem--;
arprelease(er->f->arp, a);
- if(sflag = ipv6anylocal(ifc, ipsrc))
- icmpns(er->f, ipsrc, sflag, a->ip, TARG_MULTI, ifc->mac);
+ if(ipv6local(ifc, ipsrc, a->ip))
+ icmpns(er->f, ipsrc, SRC_UNI, a->ip, TARG_MULTI, ifc->mac);
}
/*