diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-08-26 21:29:37 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-08-26 21:29:37 +0200 |
commit | acb49987e671033834c1d3e3d19f7f0e4e689333 (patch) | |
tree | 94475a61684ac0f9dc6ac696dc9a6fbbc37bdb33 /sys/src/9/ip | |
parent | 7ad08a8515f2579013c45a8473ba3c05701796da (diff) |
ip: set arp entry for own v6 address when not tentative
after running ip/ipconfig -6, we are unable to ping our
own link-local address and the arp daemon sends out useless
neighbor solicitation requests to itself. this change
adds an arp entry for our ipv6 address. however, this
must not be done for tentative interface configuration.
Diffstat (limited to 'sys/src/9/ip')
-rw-r--r-- | sys/src/9/ip/ipifc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/src/9/ip/ipifc.c b/sys/src/9/ip/ipifc.c index c07434d1d..84194a70e 100644 --- a/sys/src/9/ip/ipifc.c +++ b/sys/src/9/ip/ipifc.c @@ -538,8 +538,13 @@ out: wunlock(ifc); poperror(); - if(tentative && sendnbrdisc) - icmpns(f, 0, SRC_UNSPEC, ip, TARG_MULTI, ifc->mac); + if(!isv4(ip) && ipcmp(ip, IPnoaddr) != 0){ + if(!tentative) + arpenter(f, V6, ip, ifc->mac, 6, 0); + else if(sendnbrdisc) + icmpns(f, 0, SRC_UNSPEC, ip, TARG_MULTI, ifc->mac); + } + return nil; } @@ -1566,7 +1571,6 @@ ipifcregisterproxy(Fs *f, Ipifc *ifc, uchar *ip) ipv62smcast(net, ip); addselfcache(f, nifc, lifc, net, Rmulti); arpenter(f, V6, ip, nifc->mac, 6, 0); - // (*m->addmulti)(nifc, net, ip); break; } } |