ref: 451b0c7976df9036ee84ad2e51f698dbe7562873
parent: 9ee967663f9cec96ed9e9fd292657ed54eea47df
author: cinap_lenrek <[email protected]>
date: Fri Sep 28 16:23:53 EDT 2018
ip/ipconfig: silently ignore prefix information with Autonomous flag clear
--- a/sys/src/cmd/ip/ipconfig/ipv6.c
+++ b/sys/src/cmd/ip/ipconfig/ipv6.c
@@ -691,13 +691,16 @@
if(prfo->len != 4)
continue;
+ if((prfo->lar & AFMASK) == 0)
+ continue;
+
conf.prefixlen = prfo->plen & 127;
genipmkask(conf.mask, conf.prefixlen);
maskip(prfo->pref, conf.mask, conf.v6pref);
memmove(conf.laddr, conf.v6pref, 8);
memmove(conf.laddr+8, conf.lladdr+8, 8);
- conf.onlink = ((prfo->lar & OLMASK) != 0);
- conf.autoflag = ((prfo->lar & AFMASK) != 0);
+ conf.onlink = (prfo->lar & OLMASK) != 0;
+ conf.autoflag = (prfo->lar & AFMASK) != 0;
conf.validlt = nhgetl(prfo->validlt);
conf.preflt = nhgetl(prfo->preflt);