Date: Thu, 20 Nov 2014 00:04:52 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 195197] New: [patch] [netinet6] ipv6 prefix lifetime is not updated for existing address updated through SIOCAIFADDR_IN6 Message-ID: <bug-195197-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195197 Bug ID: 195197 Summary: [patch] [netinet6] ipv6 prefix lifetime is not updated for existing address updated through SIOCAIFADDR_IN6 Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: Needs Triage Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: guyyur@gmail.com Created attachment 149617 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=149617&action=edit Change prelist_update to be usable by SIOCAIFADDR_IN6 When refreshing an existing ipv6 address pltime and vltime using SIOCAIFADDR_IN6 the prefix lifetime is not updated. Issue seen on 11.0-CURRENT r271879M with dhcpcd 6.4.3. My ISP is providing a prefix with a lifetime of 86400 seconds. dhcpcd uses SIOCAIFADDR_IN6 to update the address with pltime and vltime. The address lifetime gets refreshed on renewals but the prefix lifetime is not updated so it expires and the route for the prefix gets deleted. Attaching several patches trying to solve the problem in different ways. In both cases, if the prefix exists it will be refreshed. In case of several addresses for same prefix and different times, prefix time will be from the last one. 1. prelist_update.patch and prelist_update_long_lines.patch Change prelist_update so it can be used by both RA and SIOCAIFADDR_IN6. prelist_update_long_lines.patch keeps the long lines for smaller diff. prelist_update.patch wraps to 80 columns. 2. Add a separate function in6_prelist_update duplicating some of the code from prelist_update but doing less work than prelist_update. Possible to reproduce with ifconfig and two addresses with the same prefix. ifconfig -L lan0 inet6 2001:DB8::1 pltime 60 vltime 60 repeat ifconfig -L lan0 inet6 2001:DB8::2 pltime 1000 vltime 1000 Checking "ndp -p" after 60 seconds will show the prefix 2001:DB8::/64 as expired. With dhcpcd: Before: # netstat -rn -f inet6 WWWW:XXXX:YYYY:ZZZZ::/64 link#1 U lan0 WWWW:XXXX:YYYY:ZZZZ::1 link#1 UHS lo0 ... After more than 86400 seconds: # ifconfig -L lan0 inet6 lan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE> inet6 fe80::AAAA:BBBB:CCCC:DDDD%lan0 prefixlen 64 scopeid 0x1 inet6 WWWW:XXXX:YYYY:ZZZZ::1 prefixlen 64 pltime 57257 vltime 57257 nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> # ndp -p WWWW:XXXX:YYYY:ZZZZ::/64 if=lan0 flags=L vltime=0, pltime=0, expired, ref=1 No advertising router ... # netstat -rn -f inet6 WWWW:XXXX:YYYY:ZZZZ::1 link#1 UHS lo0 ... -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-195197-8>