ref: 43a1202547756cc111bc6aba5d27ec81f26be155
parent: af3706392366acebd7324d78df249ebe215907ce
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Jun 9 09:02:06 EDT 2024
ip/ipconfig: ask devip to delete expired ipv6 prefixes (thanks arne) In addition to removing expired default routes, ask devip to clean out expired addresses as well. In the future, devip might do something more sophisticated than just checking the valid life time like also considering if the address is still begin used by active connections.
--- a/sys/src/cmd/ip/ipconfig/ipv6.c
+++ b/sys/src/cmd/ip/ipconfig/ipv6.c
@@ -508,6 +508,13 @@
free(cfg);
}
+static void
+issuedel6(Conf *cf)
+{
+ /* use "remove6" verb instead of "del6" for older kernels */
+ ewrite(cf->cfd, "remove6");
+}
+
static int
masklen(uchar *mask)
{
@@ -669,7 +676,10 @@
m++;
}
- /* process prefixes */
+ /* remove expired prefixes */
+ issuedel6(&conf);
+
+ /* process new prefixes */
m = sizeof *ra;
while(pktlen - m >= 8) {
n = m;
--
⑨