]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Make the in-kernel logic for the SIOCSIFVNET, SIOCSIFRVNET ioctls
authorbz <bz@FreeBSD.org>
Sun, 26 Jul 2009 11:29:26 +0000 (11:29 +0000)
committerbz <bz@FreeBSD.org>
Sun, 26 Jul 2009 11:29:26 +0000 (11:29 +0000)
commit3aec900b26d9617b51a15ddcb14a13ff18cd1c00
treeafa1c5ff605911c48845fd9724bbb425cee977aa
parent0de8238d45da1b7b3bf6f6206fbba3b8534c683a
Make the in-kernel logic for the SIOCSIFVNET, SIOCSIFRVNET ioctls
(ifconfig ifN (-)vnet <jname|jid>) work correctly.

Move vi_if_move to if.c and split it up into two functions(*),
one for each ioctl.

In the reclaim case, correctly set the vnet before calling if_vmove.

Instead of silently allowing a move of an interface from the current
vnet to the current vnet, return an error. (*)

There is some duplicate interface name checking before actually moving
the interface between network stacks without locking and thus race
prone. Ideally if_vmove will correctly and automagically handle these
in the future.

Suggested by: rwatson (*)
Approved by: re (kib)
sys/kern/kern_vimage.c
sys/net/if.c
sys/sys/vimage.h