When switching rdomains the sadl needs to be removed and re-added from the
authorclaudio <claudio@openbsd.org>
Sun, 20 Apr 2014 11:25:18 +0000 (11:25 +0000)
committerclaudio <claudio@openbsd.org>
Sun, 20 Apr 2014 11:25:18 +0000 (11:25 +0000)
commit92356849586f38fcb5583fea6e6bbadf53c00c12
treea9ee9391c289d54724fcd5c83aae2e46b7f5357c
parent4a624693135f1c33d4867091b86316284502e0b8
When switching rdomains the sadl needs to be removed and re-added from the
RB lookup tree because the rdomain id is part of the lookup key.
Without this the RB tree gets corrupted and in the worst case a use after
free can happen when the interface is destroyed.
Why the sadl addresses are added to the tree in the first place is something
to reconsider.
OK henning@, mpi@, sthen@
sys/net/if.c