]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r345970: network.subr: improve configuration of cloned gif(4) interfaces
authorEugene Grosbein <eugen@FreeBSD.org>
Thu, 4 Jul 2019 13:20:32 +0000 (13:20 +0000)
committerEugene Grosbein <eugen@FreeBSD.org>
Thu, 4 Jul 2019 13:20:32 +0000 (13:20 +0000)
commit0a48d79b90974350011a55ebff4d590954445543
tree14a8ddb3ab624ac7e453827696181a1a2838fe31
parenta65ea94c56e0d2fcec920971c24b692910dadc36
MFC r345970: network.subr: improve configuration of cloned gif(4) interfaces

ifconfig(8) syntax allows to specify only single address_family,
so we need additional invocation of ifconfig to support configuration
of cloned gif interface that may use different address families
for its internal and external addresses.

Also, ifconfig(8) does not allow to omit "inet6" keyword for address family
specifying IPv6 addresses as outer addresses of the interface.

Also, address_family is not "parameter" and it has to go before parameters
including "tunnel" keyword, so "ifconfig gif0 tunnel inet6 $oip1 $oip2" would be
wrong syntax and only "ifconfig gif0 inet6 tunnel $oip1 $oip2" is right.

With this change, the following works:

gifconfig_gif0="inet6 2a00::1 2a01::1"
ifconfig_gif0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252"
libexec/rc/network.subr