mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-01 12:19:28 +00:00
Add a new rc.conf variable, cloned_interfaces, to create cloned
interfaces at boot.
This commit is contained in:
parent
d2653b8806
commit
40995998c5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=83677
@ -86,6 +86,8 @@ tcp_drop_synfin="NO" # Set to YES to drop TCP packets with SYN+FIN
|
||||
icmp_drop_redirect="NO" # Set to YES to ignore ICMP REDIRECT packets
|
||||
icmp_log_redirect="NO" # Set to YES to log ICMP REDIRECT packets
|
||||
network_interfaces="auto" # List of network interfaces (or "auto").
|
||||
cloned_interfaces="" # List of cloned network interfaces to create.
|
||||
#cloned_interfaces="gif0 gif1 gif2 gif3" # Pre-cloning GENERIC config.
|
||||
ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration.
|
||||
#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
|
||||
#ifconfig_ed0_ipx="ipx 0x00010010" # Sample IPX address family entry.
|
||||
|
@ -127,6 +127,11 @@ network_pass1() {
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to create cloned interfaces.
|
||||
for ifn in ${cloned_interfaces}; do
|
||||
ifconfig ${ifn} create
|
||||
done
|
||||
|
||||
# Special options for sppp(4) interfaces go here. These need
|
||||
# to go _before_ the general ifconfig section, since in the case
|
||||
# of hardwired (no link1 flag) but required authentication, you
|
||||
@ -151,6 +156,9 @@ network_pass1() {
|
||||
[Aa][Uu][Tt][Oo])
|
||||
network_interfaces="`ifconfig -l`"
|
||||
;;
|
||||
*)
|
||||
network_interfaces="${network_interfaces} ${cloned_interfaces}"
|
||||
;;
|
||||
esac
|
||||
|
||||
dhcp_interfaces=""
|
||||
@ -795,7 +803,8 @@ network_gif_setup() {
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
ifconfig $i create tunnel ${peers}
|
||||
ifconfig $i create >/dev/null 2>&1
|
||||
ifconfig $i tunnel ${peers}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
@ -127,6 +127,11 @@ network_pass1() {
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to create cloned interfaces.
|
||||
for ifn in ${cloned_interfaces}; do
|
||||
ifconfig ${ifn} create
|
||||
done
|
||||
|
||||
# Special options for sppp(4) interfaces go here. These need
|
||||
# to go _before_ the general ifconfig section, since in the case
|
||||
# of hardwired (no link1 flag) but required authentication, you
|
||||
@ -151,6 +156,9 @@ network_pass1() {
|
||||
[Aa][Uu][Tt][Oo])
|
||||
network_interfaces="`ifconfig -l`"
|
||||
;;
|
||||
*)
|
||||
network_interfaces="${network_interfaces} ${cloned_interfaces}"
|
||||
;;
|
||||
esac
|
||||
|
||||
dhcp_interfaces=""
|
||||
@ -795,7 +803,8 @@ network_gif_setup() {
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
ifconfig $i create tunnel ${peers}
|
||||
ifconfig $i create >/dev/null 2>&1
|
||||
ifconfig $i tunnel ${peers}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
@ -127,6 +127,11 @@ network_pass1() {
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to create cloned interfaces.
|
||||
for ifn in ${cloned_interfaces}; do
|
||||
ifconfig ${ifn} create
|
||||
done
|
||||
|
||||
# Special options for sppp(4) interfaces go here. These need
|
||||
# to go _before_ the general ifconfig section, since in the case
|
||||
# of hardwired (no link1 flag) but required authentication, you
|
||||
@ -151,6 +156,9 @@ network_pass1() {
|
||||
[Aa][Uu][Tt][Oo])
|
||||
network_interfaces="`ifconfig -l`"
|
||||
;;
|
||||
*)
|
||||
network_interfaces="${network_interfaces} ${cloned_interfaces}"
|
||||
;;
|
||||
esac
|
||||
|
||||
dhcp_interfaces=""
|
||||
@ -795,7 +803,8 @@ network_gif_setup() {
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
ifconfig $i create tunnel ${peers}
|
||||
ifconfig $i create >/dev/null 2>&1
|
||||
ifconfig $i tunnel ${peers}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
@ -127,6 +127,11 @@ network_pass1() {
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to create cloned interfaces.
|
||||
for ifn in ${cloned_interfaces}; do
|
||||
ifconfig ${ifn} create
|
||||
done
|
||||
|
||||
# Special options for sppp(4) interfaces go here. These need
|
||||
# to go _before_ the general ifconfig section, since in the case
|
||||
# of hardwired (no link1 flag) but required authentication, you
|
||||
@ -151,6 +156,9 @@ network_pass1() {
|
||||
[Aa][Uu][Tt][Oo])
|
||||
network_interfaces="`ifconfig -l`"
|
||||
;;
|
||||
*)
|
||||
network_interfaces="${network_interfaces} ${cloned_interfaces}"
|
||||
;;
|
||||
esac
|
||||
|
||||
dhcp_interfaces=""
|
||||
@ -795,7 +803,8 @@ network_gif_setup() {
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
ifconfig $i create tunnel ${peers}
|
||||
ifconfig $i create >/dev/null 2>&1
|
||||
ifconfig $i tunnel ${peers}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
@ -127,6 +127,11 @@ network_pass1() {
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to create cloned interfaces.
|
||||
for ifn in ${cloned_interfaces}; do
|
||||
ifconfig ${ifn} create
|
||||
done
|
||||
|
||||
# Special options for sppp(4) interfaces go here. These need
|
||||
# to go _before_ the general ifconfig section, since in the case
|
||||
# of hardwired (no link1 flag) but required authentication, you
|
||||
@ -151,6 +156,9 @@ network_pass1() {
|
||||
[Aa][Uu][Tt][Oo])
|
||||
network_interfaces="`ifconfig -l`"
|
||||
;;
|
||||
*)
|
||||
network_interfaces="${network_interfaces} ${cloned_interfaces}"
|
||||
;;
|
||||
esac
|
||||
|
||||
dhcp_interfaces=""
|
||||
@ -795,7 +803,8 @@ network_gif_setup() {
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
ifconfig $i create tunnel ${peers}
|
||||
ifconfig $i create >/dev/null 2>&1
|
||||
ifconfig $i tunnel ${peers}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
@ -127,6 +127,11 @@ network_pass1() {
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to create cloned interfaces.
|
||||
for ifn in ${cloned_interfaces}; do
|
||||
ifconfig ${ifn} create
|
||||
done
|
||||
|
||||
# Special options for sppp(4) interfaces go here. These need
|
||||
# to go _before_ the general ifconfig section, since in the case
|
||||
# of hardwired (no link1 flag) but required authentication, you
|
||||
@ -151,6 +156,9 @@ network_pass1() {
|
||||
[Aa][Uu][Tt][Oo])
|
||||
network_interfaces="`ifconfig -l`"
|
||||
;;
|
||||
*)
|
||||
network_interfaces="${network_interfaces} ${cloned_interfaces}"
|
||||
;;
|
||||
esac
|
||||
|
||||
dhcp_interfaces=""
|
||||
@ -795,7 +803,8 @@ network_gif_setup() {
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
ifconfig $i create tunnel ${peers}
|
||||
ifconfig $i create >/dev/null 2>&1
|
||||
ifconfig $i tunnel ${peers}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
@ -127,6 +127,11 @@ network_pass1() {
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to create cloned interfaces.
|
||||
for ifn in ${cloned_interfaces}; do
|
||||
ifconfig ${ifn} create
|
||||
done
|
||||
|
||||
# Special options for sppp(4) interfaces go here. These need
|
||||
# to go _before_ the general ifconfig section, since in the case
|
||||
# of hardwired (no link1 flag) but required authentication, you
|
||||
@ -151,6 +156,9 @@ network_pass1() {
|
||||
[Aa][Uu][Tt][Oo])
|
||||
network_interfaces="`ifconfig -l`"
|
||||
;;
|
||||
*)
|
||||
network_interfaces="${network_interfaces} ${cloned_interfaces}"
|
||||
;;
|
||||
esac
|
||||
|
||||
dhcp_interfaces=""
|
||||
@ -795,7 +803,8 @@ network_gif_setup() {
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
ifconfig $i create tunnel ${peers}
|
||||
ifconfig $i create >/dev/null 2>&1
|
||||
ifconfig $i tunnel ${peers}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
@ -608,6 +608,14 @@ it is possible to use something like:
|
||||
.Bd -literal
|
||||
ifconfig_ed0="DHCP"
|
||||
.Ed
|
||||
.It Va cloned_interfaces
|
||||
.Pq Vt str
|
||||
Set to the list of clonable network interfaces to create on this host.
|
||||
Entries in
|
||||
.Va cloned_interfaces
|
||||
are automaticly appended to
|
||||
.Va network_interfaces
|
||||
for configuration.
|
||||
.It Va ppp_enable
|
||||
.Pq Vt bool
|
||||
If set to
|
||||
|
Loading…
Reference in New Issue
Block a user