CFT: cloned_interfaces and gifconfig in rc.d/netif
Hiroki Sato
hrs at FreeBSD.org
Mon Jul 22 14:38:07 UTC 2013
Hiroki Sato <hrs at freebsd.org> wrote
in <20130722.024513.95685108976349294.hrs at allbsd.org>:
hr> Hi,
hr>
hr> The attached patch allows rc.d/netif to create IFs in
hr> $cloned_interfaces when interface name(s) is specified. For example,
hr> when the following lines are in rc.conf:
hr>
hr> cloned_interfaces="bridge0 bridge1"
hr> ifconfig_bridge0="..."
hr> ifconfig_bridge1="..."
hr>
hr> The following commands create the interfaces and destroy them.
hr>
hr> # /etc/rc.d/netif start bridge0 bridge1
hr> # /etc/rc.d/netif stop bridge0 bridge1
hr>
hr> netif cloneup/clonedown does this without the patch, but it cannot
hr> configure the interfaces and does not support clean teardown.
hr>
hr> Also, routines which handle $gif_interfaces are merged into ones for
hr> $cloned_interfaces. ifconfig_gifN and other variants did not work
hr> with gif interfaces defined in $gif_interfaces. The patch solves
hr> this issue.
hr>
hr> Basically there should be no functionality regression for the
hr> existing configurations. Can anyone who are using $gif_interfaces
hr> and/or $cloned_interfaces test this? I would like to know if there is
hr> regression or not.
A revised version based on feedback which I received in private
emails is attached. This includes rc.conf(5) change explaining the
new variables. The following is a brief description of the changes:
-----
- Reimplement gif_interfaces as a variant of $cloned_interfaces.
Newly-configured systems should use $cloned_interfaces.
- Call clone_{up,down}() in rc.d/netif {start,stop}.
- Add rc.d/netif clear. The "clear" argument is basically equivalent to
"stop" but it does not call clone_down().
- Add "ifname:sticky" keyword into $cloned_interfaces. If :sticky is
specified, the interface will not be destroyed in rc.d/netif stop.
- Add cloned_interfaces_sticky={YES,NO}. This variable globally sets
:sticky keyword above for all interfaces. The default value is NO.
----
-- Hiroki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: network.subr.gifconfig.20130722-2.diff
Type: text/x-patch
Size: 7453 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20130722/43acf1ed/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20130722/43acf1ed/attachment.sig>
More information about the freebsd-current
mailing list