On Sun, Aug 06, 2017 at 10:29:09AM -0400, Martin Pieuchot wrote:
> On 03/08/17(Thu) 09:13, Florian Obser wrote:
> > 
> > as mpi pointed out in "nd6 address expiration & NET_LOCK() contention"
> > we run nd6_expire every second. That seems a bit silly considering
> > that we normally have a pltime of a day.
> > 
> > With a bit of math we can work out when the timer should fire when we
> > set pltime/vltime and when we walk the list in nd6_expire.
> > 
> > This intentionally only lowers the timeout in in6_update_ifa(). That
> > means in the case of no privacy addresses and default pltime/vltime
> > and no router advertisements getting lost the timer fires every week
> > and notices that it has nothing to do. I think that is acceptable
> > since it fires 600.000 times less...
> > 
> > Tests, comments, OKs?
> 
> I like it, comments below.

next try, but I probably missunderstood your comments.

If I try to printf-debug this in nd6_expire_timer_update()

I get a panic; doesn'tmatter if the printf is inside or outside the
KERNEL_LOCK() block:

login: nd6_expire_timer_update: expire_time: -1, nd6_expire_time: -1, set: 0
nd6_expire_timer_update: expire_time: 86299, nd6_expire_time: 86299, set: 0
kernel: double fault trap, code=0
Stopped at      printf: pushq   %rbp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
  16563  59220     73    0x100010       0x80    3  syslogd
 101481  17851    115    0x100012       0x80    2  slaacd
*441054  44434      0           0          0    1  slaacd
printf(ffffffff81982c1e,28,8000000000000000,0,28,8000000000000000) at printf
panic(ffff8000221b4110,104,ffff8000221b41a0,ffffffff81982c1e,0,ffff8000221b4008
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4218,104,ffff8000221b42a8,ffffffff81982c1e,0,ffff8000221b4110
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4320,104,ffff8000221b43b0,ffffffff81982c1e,0,ffff8000221b4218
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4428,104,ffff8000221b44b8,ffffffff81982c1e,ffffff013f60e4d0,f
fff8000221b4320) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4530,104,ffff8000221b45c0,ffffffff81982c1e,0,ffff8000221b4428
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4638,104,ffff8000221b46c8,ffffffff81982c1e,0,ffff8000221b4530
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4740,104,ffff8000221b47d0,ffffffff81982c1e,0,ffff8000221b4638
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
end trace frame: 0xffff8000221b47c0, count: 0
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports.  Insufficient info makes it difficult to find and fix bugs.
ddb{1}> trace
printf(ffffffff81982c1e,28,8000000000000000,0,28,8000000000000000) at printf
panic(ffff8000221b4110,104,ffff8000221b41a0,ffffffff81982c1e,0,ffff8000221b4008
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4218,104,ffff8000221b42a8,ffffffff81982c1e,0,ffff8000221b4110
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4320,104,ffff8000221b43b0,ffffffff81982c1e,0,ffff8000221b4218
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4428,104,ffff8000221b44b8,ffffffff81982c1e,ffffff013f60e4d0,f
fff8000221b4320) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4530,104,ffff8000221b45c0,ffffffff81982c1e,0,ffff8000221b4428
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4638,104,ffff8000221b46c8,ffffffff81982c1e,0,ffff8000221b4530
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4740,104,ffff8000221b47d0,ffffffff81982c1e,0,ffff8000221b4638
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4848,104,ffff8000221b48d8,ffffffff81982c1e,0,ffff8000221b4740
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4950,104,ffff8000221b49e0,ffffffff81982c1e,0,ffff8000221b4848
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4a58,104,ffff8000221b4ae8,ffffffff81982c1e,0,ffff8000221b4950
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4b60,104,ffff8000221b4bf0,ffffffff81982c1e,0,ffff8000221b4a58
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4c68,104,ffff8000221b4cf8,ffffffff81982c1e,0,ffff8000221b4b60
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4d70,104,ffff8000221b4e00,ffffffff81982c1e,0,ffff8000221b4c68
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4e78,104,ffff8000221b4f08,ffffffff81982c1e,0,ffff8000221b4d70
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b4f80,104,ffff8000221b5010,ffffffff81982c1e,0,ffff8000221b4e78
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b5088,104,ffff8000221b5118,ffffffff81982c1e,0,ffff8000221b4f80
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b5190,104,ffff8000221b5220,ffffffff81982c1e,0,ffff8000221b5088
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b5298,104,ffff8000221b5328,ffffffff81982c1e,0,ffff8000221b5190
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b53a0,104,ffff8000221b5430,ffffffff81982c1e,0,ffff8000221b5298
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b54a8,104,ffff8000221b5538,ffffffff81982c1e,0,ffff8000221b53a0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b55b0,104,ffff8000221b5640,ffffffff81982c1e,0,ffff8000221b54a8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b56b8,104,ffff8000221b5748,ffffffff81982c1e,0,ffff8000221b55b0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b57c0,104,ffff8000221b5850,ffffffff81982c1e,0,ffff8000221b56b8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b58c8,104,ffff8000221b5958,ffffffff81982c1e,0,ffff8000221b57c0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b59d0,104,ffff8000221b5a60,ffffffff81982c1e,0,ffff8000221b58c8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b5ad8,104,ffff8000221b5b68,ffffffff81982c1e,0,ffff8000221b59d0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b5be0,104,ffff8000221b5c70,ffffffff81982c1e,0,ffff8000221b5ad8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b5ce8,104,ffff8000221b5d78,ffffffff81982c1e,0,ffff8000221b5be0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b5df0,104,ffff8000221b5e80,ffffffff81982c1e,0,ffff8000221b5ce8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b5ef8,104,ffff8000221b5f88,ffffffff81982c1e,0,ffff8000221b5df0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6000,104,ffff8000221b6090,ffffffff81982c1e,0,ffff8000221b5ef8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6108,104,ffff8000221b6198,ffffffff81982c1e,0,ffff8000221b6000
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6210,104,ffff8000221b62a0,ffffffff81982c1e,0,ffff8000221b6108
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6318,104,ffff8000221b63a8,ffffffff81982c1e,0,ffff8000221b6210
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6420,104,ffff8000221b64b0,ffffffff81982c1e,0,ffff8000221b6318
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6528,104,ffff8000221b65b8,ffffffff81982c1e,0,ffff8000221b6420
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6630,104,ffff8000221b66c0,ffffffff81982c1e,0,ffff8000221b6528
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6738,104,ffff8000221b67c8,ffffffff81982c1e,0,ffff8000221b6630
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6840,104,ffff8000221b68d0,ffffffff81982c1e,0,ffff8000221b6738
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6948,104,ffff8000221b69d8,ffffffff81982c1e,0,ffff8000221b6840
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6a50,104,ffff8000221b6ae0,ffffffff81982c1e,0,ffff8000221b6948
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6b58,104,ffff8000221b6be8,ffffffff81982c1e,0,ffff8000221b6a50
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6c60,104,ffff8000221b6cf0,ffffffff81982c1e,0,ffff8000221b6b58
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6d68,104,ffff8000221b6df8,ffffffff81982c1e,0,ffff8000221b6c60
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6e70,104,ffff8000221b6f00,ffffffff81982c1e,0,ffff8000221b6d68
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b6f78,104,ffff8000221b7008,ffffffff81982c1e,0,ffff8000221b6e70
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b7080,104,ffff8000221b7110,ffffffff81982c1e,0,ffff8000221b6f78
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b7188,104,ffff8000221b7218,ffffffff81982c1e,0,ffff8000221b7080
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b7290,104,ffff8000221b7320,ffffffff81982c1e,0,ffff8000221b7188
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b7398,104,ffff8000221b7428,ffffffff81982c1e,0,ffff8000221b7290
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b74a0,104,ffff8000221b7530,ffffffff81982c1e,0,ffff8000221b7398
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b75a8,104,ffff8000221b7638,ffffffff81982c1e,0,ffff8000221b74a0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b76b0,104,ffff8000221b7740,ffffffff81982c1e,0,ffff8000221b75a8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b77b8,104,ffff8000221b7848,ffffffff81982c1e,0,ffff8000221b76b0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b78c0,104,ffff8000221b7950,ffffffff81982c1e,0,ffff8000221b77b8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b79c8,104,ffff8000221b7a58,ffffffff81982c1e,0,ffff8000221b78c0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b7ad0,104,ffff8000221b7b60,ffffffff81982c1e,0,ffff8000221b79c8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b7bd8,104,ffff8000221b7c68,ffffffff81982c1e,0,ffff8000221b7ad0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b7ce0,104,ffff8000221b7d70,ffffffff81982c1e,0,ffff8000221b7bd8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b7de8,104,ffff8000221b7e78,ffffffff81982c1e,0,ffff8000221b7ce0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b7ef0,104,ffff8000221b7f80,ffffffff81982c1e,0,ffff8000221b7de8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b7ff8,104,ffff8000221b8088,ffffffff81982c1e,0,ffff8000221b7ef0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b8100,104,ffff8000221b8190,ffffffff81982c1e,0,ffff8000221b7ff8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b8208,104,ffff8000221b8298,ffffffff81982c1e,0,ffff8000221b8100
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,1eb50,ffffffff812040ce,ffff800022
1b8210,246) at __mtx_enter+0x62
panic(ffff8000221b8310,104,ffff8000221b83a0,ffffffff81982c1e,0,ffff8000221b8208
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,ffffffff8141a405,ffff8000221b8370
,ffff8000221b8490,ffffff000979ee80) at __mtx_enter+0x62
panic(ffff8000221b8418,104,ffff8000221b84a8,ffffffff81982c1e,0,ffff8000221b8310
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,ffffffffffffffff,ffffff0001cca0
10,81514358) at __mtx_enter+0x62
panic(ffff8000221b8520,104,ffff8000221b85b0,ffffffff81982c1e,ffffff013f60e4e8,f
fff8000221b8418) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,7f7ffffdb000,ffffff00097a4c80,fff
fff013f60e4d0,ffffff01201e4370) at __mtx_enter+0x62
panic(ffff8000221b8628,104,ffff8000221b86b8,ffffffff81982c1e,1,ffff8000221b8520
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,ffffffffffffffff,0,ffff8000221b86
98,ffffffff81419c89) at __mtx_enter+0x62
panic(ffff8000221b8730,104,ffff8000221b87c0,ffffffff81982c1e,1ffff0000000002,ff
ff8000221b8628) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,ffffff01201dd700,ffff80000a3af000
,3,3000) at __mtx_enter+0x62
panic(ffff8000221b8838,104,ffff8000221b88c8,ffffffff81982c1e,719000,ffff8000221
b8730) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,9791cee0ccf8fbcd,ffff800000104c00
,9791cee0ccf8fbcd,bffba000) at __mtx_enter+0x62
panic(ffff8000221b8940,104,ffff8000221b89d0,ffffffff81982c1e,6b2364163,ffff8000
221b8838) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,ffffff01201a91d0,4,202,ffffff0120
1a91d0) at __mtx_enter+0x62
panic(ffff8000221b8a48,104,ffff8000221b8ad8,ffffffff81982c1e,ffffffff81419ff2,f
fff8000221b8940) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,ffff8000221b8b20,0,246,282) at __
mtx_enter+0x62
panic(ffff8000221b8b50,104,ffff8000221b8be0,ffffffff81982c1e,ffff8000221b8ac0,f
fff8000221b8a48) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,ffffffff8164b439,ffff8000221b8b40
,ffff8000221a6480,18) at __mtx_enter+0x62
panic(ffff8000221b8c58,104,ffff8000221b8ce8,ffffffff81982c1e,ffff8000221b8c10,f
fff8000221b8b50) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,ffff8000221b8c80,ffff8000221b8c48
,118,ffffffff81203735) at __mtx_enter+0x62
panic(ffff8000221b8d60,104,ffff8000221b8df0,ffffffff81982c1e,ffffff01201e9170,f
fff8000221b8c58) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,9791cee0ccf8fbcd,ffff8000221a62
48,100000000) at __mtx_enter+0x62
panic(ffff8000221b8e68,104,ffff8000221b8ef8,ffffffff81982c1e,0,ffff8000221b8d60
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,480,ffff8000221a6248,0,0) at __mt
x_enter+0x62
panic(ffff8000221b8f70,104,ffff8000221b9000,ffffffff81982c1e,0,ffff8000221b8e68
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,7f7ffffdb350,40,521865154da,1) at
 __mtx_enter+0x62
panic(ffff8000221b9078,104,ffff8000221b9108,ffffffff81982c1e,521865154da,ffff80
00221b8f70) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b9180,104,ffff8000221b9210,ffffffff81982c1e,1ac768181d61d181,f
fff8000221b9078) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b9288,104,ffff8000221b9318,ffffffff81982c1e,0,ffff8000221b9180
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b9390,104,ffff8000221b9420,ffffffff81982c1e,0,ffff8000221b9288
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,307cc405000,ffff8000221bdff0,ff
ff8000221bdc10) at __mtx_enter+0x62
panic(ffff8000221b9498,104,ffff8000221b9528,ffffffff81982c1e,0,ffff8000221b9390
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b95a0,104,ffff8000221b9630,ffffffff81982c1e,0,ffff8000221b9498
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b96a8,104,ffff8000221b9738,ffffffff81982c1e,0,ffff8000221b95a0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b97b0,104,ffff8000221b9840,ffffffff81982c1e,0,ffff8000221b96a8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b98b8,104,ffff8000221b9948,ffffffff81982c1e,0,ffff8000221b97b0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b99c0,104,ffff8000221b9a50,ffffffff81982c1e,0,ffff8000221b98b8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b9ac8,104,ffff8000221b9b58,ffffffff81982c1e,0,ffff8000221b99c0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b9bd0,104,ffff8000221b9c60,ffffffff81982c1e,0,ffff8000221b9ac8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b9cd8,104,ffff8000221b9d68,ffffffff81982c1e,0,ffff8000221b9bd0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b9de0,104,ffff8000221b9e70,ffffffff81982c1e,0,ffff8000221b9cd8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b9ee8,104,ffff8000221b9f78,ffffffff81982c1e,0,ffff8000221b9de0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221b9ff0,104,ffff8000221ba080,ffffffff81982c1e,0,ffff8000221b9ee8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221ba0f8,104,ffff8000221ba188,ffffffff81982c1e,0,ffff8000221b9ff0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221ba200,104,ffff8000221ba290,ffffffff81982c1e,0,ffff8000221ba0f8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221ba308,104,ffff8000221ba398,ffffffff81982c1e,0,ffff8000221ba200
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221ba410,104,ffff8000221ba4a0,ffffffff81982c1e,0,ffff8000221ba308
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221ba518,104,ffff8000221ba5a8,ffffffff81982c1e,0,ffff8000221ba410
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221ba620,104,ffff8000221ba6b0,ffffffff81982c1e,0,ffff8000221ba518
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221ba728,104,ffff8000221ba7b8,ffffffff81982c1e,0,ffff8000221ba620
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221ba830,104,ffff8000221ba8c0,ffffffff81982c1e,0,ffff8000221ba728
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221ba938,104,ffff8000221ba9c8,ffffffff81982c1e,0,ffff8000221ba830
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221baa40,104,ffff8000221baad0,ffffffff81982c1e,0,ffff8000221ba938
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bab48,104,ffff8000221babd8,ffffffff81982c1e,0,ffff8000221baa40
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bac50,104,ffff8000221bace0,ffffffff81982c1e,0,ffff8000221bab48
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bad58,104,ffff8000221bade8,ffffffff81982c1e,0,ffff8000221bac50
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bae60,104,ffff8000221baef0,ffffffff81982c1e,0,ffff8000221bad58
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221baf68,104,ffff8000221baff8,ffffffff81982c1e,0,ffff8000221bae60
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bb070,104,ffff8000221bb100,ffffffff81982c1e,0,ffff8000221baf68
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bb178,104,ffff8000221bb208,ffffffff81982c1e,0,ffff8000221bb070
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bb280,104,ffff8000221bb310,ffffffff81982c1e,0,ffff8000221bb178
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bb388,104,ffff8000221bb418,ffffffff81982c1e,0,ffff8000221bb280
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bb490,104,ffff8000221bb520,ffffffff81982c1e,0,ffff8000221bb388
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bb598,104,ffff8000221bb628,ffffffff81982c1e,0,ffff8000221bb490
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bb6a0,104,ffff8000221bb730,ffffffff81982c1e,0,ffff8000221bb598
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bb7a8,104,ffff8000221bb838,ffffffff81982c1e,0,ffff8000221bb6a0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bb8b0,104,ffff8000221bb940,ffffffff81982c1e,0,ffff8000221bb7a8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bb9b8,104,ffff8000221bba48,ffffffff81982c1e,0,ffff8000221bb8b0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bbac0,104,ffff8000221bbb50,ffffffff81982c1e,0,ffff8000221bb9b8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bbbc8,104,ffff8000221bbc58,ffffffff81982c1e,0,ffff8000221bbac0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bbcd0,104,ffff8000221bbd60,ffffffff81982c1e,0,ffff8000221bbbc8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bbdd8,104,ffff8000221bbe68,ffffffff81982c1e,0,ffff8000221bbcd0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bbee0,104,ffff8000221bbf70,ffffffff81982c1e,0,ffff8000221bbdd8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bbfe8,104,ffff8000221bc078,ffffffff81982c1e,0,ffff8000221bbee0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bc0f0,104,ffff8000221bc180,ffffffff81982c1e,0,ffff8000221bbfe8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bc1f8,104,ffff8000221bc288,ffffffff81982c1e,0,ffff8000221bc0f0
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bc300,104,ffff8000221bc390,ffffffff81982c1e,0,ffff8000221bc1f8
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bc408,104,ffff8000221bc498,ffffffff81982c1e,0,ffff8000221bc300
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bc510,104,ffff8000221bc5a0,ffffffff81982c1e,0,ffff8000221bc408
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bc618,104,ffff8000221bc6a8,ffffffff81982c1e,0,ffff8000221bc510
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bc720,104,ffff8000221bc7b0,ffffffff81982c1e,0,ffff8000221bc618
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bc828,104,ffff8000221bc8b8,ffffffff81982c1e,0,ffff8000221bc720
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bc930,104,ffff8000221bc9c0,ffffffff81982c1e,0,ffff8000221bc828
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bca38,104,ffff8000221bcac8,ffffffff81982c1e,0,ffff8000221bc930
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bcb40,104,ffff8000221bcbd0,ffffffff81982c1e,0,ffff8000221bca38
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bcc48,104,ffff8000221bccd8,ffffffff81982c1e,0,ffff8000221bcb40
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bcd50,104,ffff8000221bcde0,ffffffff81982c1e,0,ffff8000221bcc48
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bce58,104,ffff8000221bcee8,ffffffff81982c1e,0,ffff8000221bcd50
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bcf60,104,ffff8000221bcff0,ffffffff81982c1e,0,ffff8000221bce58
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bd068,104,ffff8000221bd0f8,ffffffff81982c1e,0,ffff8000221bcf60
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bd170,104,ffff8000221bd200,ffffffff81982c1e,0,ffff8000221bd068
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bd278,104,ffff8000221bd308,ffffffff81982c1e,0,ffff8000221bd170
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,0,0,0,0) at __mtx_enter+0x62
panic(ffff8000221bd380,104,ffff8000221bd410,ffffffff81982c1e,0,ffff8000221bd278
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,ffff8000221bd578,0,ffffffff8141a1
49,ffff8000221bd3d0) at __mtx_enter+0x62
panic(ffff8000221bd488,104,ffff8000221bd518,ffffffff81982c1e,ffffffff81419c89,f
fff8000221bd380) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,200000000,0,0,ffffffffffffffff) a
t __mtx_enter+0x62
panic(ffff8000221bd590,104,ffff8000221bd620,ffffffff81982c1e,a,ffff8000221bd488
) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,15000,15000,ffffffff81756f6e,ffff
8000221bd590) at __mtx_enter+0x62
panic(ffff8000221bd698,100,ffff8000221bd728,ffffffff81982c1e,ffff8000221bd6d8,f
fff8000221bd590) at panic+0xab
__mtx_enter(ffffffff8186ba93,9791cee0ccf8fbcd,ffffff013f60f800,ffff8000221bd728
,ffffffff8186ba93,9791cee0ccf8fbcd) at __mtx_enter+0x62
panic(ffff8000221a6480,ffff8000221bd800,ffff8000221b9000,ffffffff8197bca5,0,fff
f8000221bd698) at panic+0xab
__mtx_enter(6,9791cee0ccf8fbcd,ffffff013f60f800,ffff8000221b9000,15000,9791cee0
ccf8fbcd) at __mtx_enter+0x62
trap() at trap+0x51f
--- trap (number 6) ---
strlen(ffff800000106290,ffff8000003e8c00,ffff8000221bdda0,1,ffffffff81a558f6,97
91cee0ccf8fbcd) at strlen+0x20
printf(0,9791cee0ccf8fbcd,1,ffff8000221bd9b0,ffff8000221bda20,3000000010) at pr
intf+0x6b
in6_update_ifa(ffff8000221bdda0,0,ffff800000106290,8080691a,0,9791cee0ccf8fbcd)
 at in6_update_ifa+0xa5f
in6_ioctl(6,8080691a,ffff800000106290,ffff8000221a6480,ffff8000221bdda0,ffff800
000106290) at in6_ioctl+0x4ed
ifioctl(ffff8000221a6480,ffff8000221bdda0,8004667d,ffffff013f2a4bc0,8080691a,97
91cee0ccf8fbcd) at ifioctl+0x5e0
soo_ioctl(80,ffffff01207d3850,8004667d,ffff8000221bde90,ffff8000221bdda0,ffffff
ff81ab4200) at soo_ioctl+0x163
sys_ioctl(ffff8000221bdf20,360,ffff8000221a6480,0,7f7ffffe0370,9791cee0ccf8fbcd
) at sys_ioctl+0x353
syscall() at syscall+0x251
--- syscall (number 54) ---
end of kernel
end trace frame: 0x7f7ffffe0310, count: -303



diff --git lib/libc/gen/sysctl.3 lib/libc/gen/sysctl.3
index bb0317d7187..0f6ea4233fe 100644
--- lib/libc/gen/sysctl.3
+++ lib/libc/gen/sysctl.3
@@ -1639,7 +1639,6 @@ The currently defined protocols and names are:
 .It icmp6 Ta nd6_delay Ta integer Ta yes
 .It icmp6 Ta nd6_maxnudhint Ta integer Ta yes
 .It icmp6 Ta nd6_mmaxtries Ta integer Ta yes
-.It icmp6 Ta nd6_prune Ta integer Ta yes
 .It icmp6 Ta nd6_umaxtries Ta integer Ta yes
 .It icmp6 Ta redirtimeout Ta integer Ta yes
 .It ip6 Ta auto_flowlabel Ta integer Ta yes
@@ -1718,10 +1717,6 @@ This variable specifies the
 constant in IPv6 neighbor discovery specification
 .Pq RFC 4861 .
 .Pp
-.It Li icmp6.nd6_prune Pq Va net.inet6.icmp6.nd6_prune
-This variable specifies the interval between IPv6 neighbor cache babysitting
-in seconds.
-.Pp
 .It Li icmp6.nd6_umaxtries Pq Va net.inet6.icmp6.nd6_umaxtries
 This variable specifies the
 .Dv MAX_UNICAST_SOLICIT
diff --git sys/netinet/icmp6.h sys/netinet/icmp6.h
index 1713f6c2125..628ffe36dd4 100644
--- sys/netinet/icmp6.h
+++ sys/netinet/icmp6.h
@@ -502,7 +502,6 @@ struct icmp6stat {
 #define ICMPV6CTL_STATS                1
 #define ICMPV6CTL_REDIRACCEPT  2       /* accept/process redirects */
 #define ICMPV6CTL_REDIRTIMEOUT 3       /* redirect cache time */
-#define ICMPV6CTL_ND6_PRUNE    6
 #define ICMPV6CTL_ND6_DELAY    8
 #define ICMPV6CTL_ND6_UMAXTRIES        9
 #define ICMPV6CTL_ND6_MMAXTRIES                10
@@ -521,7 +520,7 @@ struct icmp6stat {
        { "redirtimeout", CTLTYPE_INT }, \
        { 0, 0 }, \
        { 0, 0 }, \
-       { "nd6_prune", CTLTYPE_INT }, \
+       { 0, 0 }, \
        { 0, 0 }, \
        { "nd6_delay", CTLTYPE_INT }, \
        { "nd6_umaxtries", CTLTYPE_INT }, \
@@ -543,7 +542,7 @@ struct icmp6stat {
        &icmp6_redirtimeout, \
        NULL, \
        NULL, \
-       &nd6_prune, \
+       NULL, \
        NULL, \
        &nd6_delay, \
        &nd6_umaxtries, \
diff --git sys/netinet6/in6.c sys/netinet6/in6.c
index cafdd9fe36f..6f37a0a3418 100644
--- sys/netinet6/in6.c
+++ sys/netinet6/in6.c
@@ -497,6 +497,7 @@ in6_update_ifa(struct ifnet *ifp, struct in6_aliasreq *ifra,
        struct in6_addrlifetime *lt;
        struct in6_multi_mship *imm;
        struct rtentry *rt;
+       time_t expire_time = -1;
        char addr[INET6_ADDRSTRLEN];
 
        NET_ASSERT_LOCKED();
@@ -686,6 +687,10 @@ in6_update_ifa(struct ifnet *ifp, struct in6_aliasreq 
*ifra,
         */
        ia6->ia6_flags = ifra->ifra_flags;
 
+       nd6_next_expire_time(ia6, &expire_time);
+
+       nd6_expire_timer_update(expire_time, 0);
+
        /*
         * We are done if we have simply modified an existing address.
         */
diff --git sys/netinet6/nd6.c sys/netinet6/nd6.c
index 245b64c6155..d2bd9151783 100644
--- sys/netinet6/nd6.c
+++ sys/netinet6/nd6.c
@@ -66,7 +66,7 @@
 #define ND6_RECALC_REACHTM_INTERVAL (60 * 120) /* 2 hours */
 
 /* timer values */
-int    nd6_prune       = 1;    /* walk list every 1 seconds */
+time_t nd6_expire_time = -1;   /* at which time_uptime nd6_expire runs */
 int    nd6_delay       = 5;    /* delay first probe time 5 second */
 int    nd6_umaxtries   = 3;    /* maximum unicast query */
 int    nd6_mmaxtries   = 3;    /* maximum multicast query */
@@ -122,8 +122,6 @@ nd6_init(void)
        timeout_set_proc(&nd6_slowtimo_ch, nd6_slowtimo, NULL);
        timeout_add_sec(&nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL);
        timeout_set(&nd6_expire_timeout, nd6_expire_timer, NULL);
-       timeout_add_sec(&nd6_expire_timeout, nd6_prune);
-
 }
 
 struct nd_ifinfo *
@@ -417,6 +415,43 @@ nd6_llinfo_timer(void *arg)
        NET_UNLOCK(s);
 }
 
+void
+nd6_next_expire_time(struct in6_ifaddr *ia6, time_t *expire_time)
+{
+       if (ia6->ia6_lifetime.ia6t_vltime != ND6_INFINITE_LIFETIME) {
+               if ( *expire_time == -1 || *expire_time >
+                   ia6->ia6_lifetime.ia6t_expire)
+                       *expire_time = ia6->ia6_lifetime.ia6t_expire;
+       }
+
+       if (!(ia6->ia6_flags & IN6_IFF_DEPRECATED) &&
+           ia6->ia6_lifetime.ia6t_pltime != ND6_INFINITE_LIFETIME) {
+               if ( *expire_time == -1 || *expire_time >
+                   ia6->ia6_lifetime.ia6t_preferred)
+                       *expire_time = ia6->ia6_lifetime.ia6t_preferred;
+       }
+}
+
+void
+nd6_expire_timer_update(time_t expire_time, int set)
+{
+       int secs;
+       KERNEL_LOCK();
+
+       if (expire_time != -1 && (set || nd6_expire_time == -1 ||
+           nd6_expire_time > expire_time)) {
+               expire_time++; /* fire one second after expiry */
+               secs = expire_time - time_uptime;
+               if ( secs < 0)
+                       secs = 0;
+               timeout_add_sec(&nd6_expire_timeout, secs);
+       }
+
+       if (expire_time != -1 || set)
+               nd6_expire_time = expire_time;
+       KERNEL_UNLOCK();
+}
+
 /*
  * Expire interface addresses.
  */
@@ -424,13 +459,12 @@ void
 nd6_expire(void *unused)
 {
        struct ifnet *ifp;
+       time_t expire_time = -1;
        int s;
 
        KERNEL_LOCK();
        NET_LOCK(s);
 
-       timeout_add_sec(&nd6_expire_timeout, nd6_prune);
-
        TAILQ_FOREACH(ifp, &ifnet, if_list) {
                struct ifaddr *ifa, *nifa;
                struct in6_ifaddr *ia6;
@@ -442,20 +476,18 @@ nd6_expire(void *unused)
                        /* check address lifetime */
                        if (IFA6_IS_INVALID(ia6)) {
                                in6_purgeaddr(&ia6->ia_ifa);
-                       } else if (IFA6_IS_DEPRECATED(ia6)) {
-                               ia6->ia6_flags |= IN6_IFF_DEPRECATED;
                        } else {
-                               /*
-                                * A new RA might have made a deprecated address
-                                * preferred.
-                                */
-                               ia6->ia6_flags &= ~IN6_IFF_DEPRECATED;
+                               if (IFA6_IS_DEPRECATED(ia6))
+                                       ia6->ia6_flags |= IN6_IFF_DEPRECATED;
+
+                               nd6_next_expire_time(ia6, &expire_time);
                        }
                }
        }
 
        NET_UNLOCK(s);
        KERNEL_UNLOCK();
+       nd6_expire_timer_update(expire_time, 1);
 }
 
 void
diff --git sys/netinet6/nd6.h sys/netinet6/nd6.h
index 3b08e2c5dfe..6a48d384cca 100644
--- sys/netinet6/nd6.h
+++ sys/netinet6/nd6.h
@@ -138,7 +138,6 @@ struct      llinfo_nd6 {
                (((MIN_RANDOM_FACTOR * (x >> 10)) + (arc4random() & \
                ((MAX_RANDOM_FACTOR - MIN_RANDOM_FACTOR) * (x >> 10)))) /1000)
 
-extern int nd6_prune;
 extern int nd6_delay;
 extern int nd6_umaxtries;
 extern int nd6_mmaxtries;
@@ -208,6 +207,8 @@ void nd6_rs_input(struct mbuf *, int, int);
 int in6_ifdel(struct ifnet *, struct in6_addr *);
 void rt6_flush(struct in6_addr *, struct ifnet *);
 
+void nd6_next_expire_time(struct in6_ifaddr *, time_t *);
+void nd6_expire_timer_update(time_t, int);
 #endif /* _KERNEL */
 
 #endif /* _NETINET6_ND6_H_ */


-- 
I'm not entirely sure you are real.

Reply via email to