Fix some wrong fields and add dhcp definition
This commit is contained in:
parent
7f65658cb6
commit
6d8cd3530f
|
@ -20,7 +20,8 @@ new_if_vrf "$VRF" 20
|
||||||
if_bridge_property 'mcast_snooping' "$IFACE" '0' '' # TODO: Remove such entries when bridges play well with multicasting
|
if_bridge_property 'mcast_snooping' "$IFACE" '0' '' # TODO: Remove such entries when bridges play well with multicasting
|
||||||
if_bridge_property 'mcast_querier' "$IFACE"
|
if_bridge_property 'mcast_querier' "$IFACE"
|
||||||
if_bridge_property 'mcast_mld_version' "$IFACE" '2' ''
|
if_bridge_property 'mcast_mld_version' "$IFACE" '2' ''
|
||||||
new_forward "$IFACE"
|
if_forward "$IFACE"
|
||||||
|
if_dhcp "$IFACE"
|
||||||
|
|
||||||
if_slave "$IFACE" "vnet0"
|
if_slave "$IFACE" "vnet0"
|
||||||
new_if_phys "vnet0"
|
new_if_phys "vnet0"
|
||||||
|
@ -30,20 +31,20 @@ new_if_vrf "$VRF" 20
|
||||||
IFACE="tristan"
|
IFACE="tristan"
|
||||||
if_slave "$VRF" "$IFACE"
|
if_slave "$VRF" "$IFACE"
|
||||||
new_if_wg "$IFACE"
|
new_if_wg "$IFACE"
|
||||||
new_forward "$IFACE"
|
if_forward "$IFACE"
|
||||||
if_ip_addr "$IFACE" "fe80::1/64"
|
if_ip_addr "$IFACE" "fe80::1/64"
|
||||||
if_route_vrf_addr "$VRF" "$IFACE" "2a04:5b81:2010::/48"
|
if_route_vrf_addr "$VRF" "$IFACE" "2a04:5b81:2010::/48"
|
||||||
|
|
||||||
IFACE="gustav"
|
IFACE="gustav"
|
||||||
if_slave "$VRF" "$IFACE"
|
if_slave "$VRF" "$IFACE"
|
||||||
new_if_wg "$IFACE"
|
new_if_wg "$IFACE"
|
||||||
new_forward "$IFACE"
|
if_forward "$IFACE"
|
||||||
if_ip_addr "$IFACE" "fe80::1/64"
|
if_ip_addr "$IFACE" "fe80::1/64"
|
||||||
if_route_vrf_addr "$VRF" "$IFACE" "2a04:5b81:2011::/48"
|
if_route_vrf_addr "$VRF" "$IFACE" "2a04:5b81:2011::/48"
|
||||||
|
|
||||||
IFACE="caskd"
|
IFACE="caskd"
|
||||||
if_slave "$VRF" "$IFACE"
|
if_slave "$VRF" "$IFACE"
|
||||||
new_if_wg "$IFACE"
|
new_if_wg "$IFACE"
|
||||||
new_forward "$IFACE"
|
if_forward "$IFACE"
|
||||||
if_ip_addr "$IFACE" "fe80::1/64"
|
if_ip_addr "$IFACE" "fe80::1/64"
|
||||||
if_route_vrf_addr "$VRF" "$IFACE" "2a04:5b81:2060::/48"
|
if_route_vrf_addr "$VRF" "$IFACE" "2a04:5b81:2060::/48"
|
||||||
|
|
|
@ -11,4 +11,5 @@ new_if_bridge "$IFACE"
|
||||||
if_bridge_property 'mcast_snooping' "$IFACE" '0' ''
|
if_bridge_property 'mcast_snooping' "$IFACE" '0' ''
|
||||||
if_bridge_property 'mcast_querier' "$IFACE"
|
if_bridge_property 'mcast_querier' "$IFACE"
|
||||||
if_bridge_property 'mcast_mld_version' "$IFACE" '2' ''
|
if_bridge_property 'mcast_mld_version' "$IFACE" '2' ''
|
||||||
|
if_dhcp "$IFACE"
|
||||||
if_slave "$IFACE" "eth0"
|
if_slave "$IFACE" "eth0"
|
||||||
|
|
28
netdev.sh
28
netdev.sh
|
@ -231,7 +231,7 @@ new_if_wg() {
|
||||||
|
|
||||||
new_link "$if"
|
new_link "$if"
|
||||||
# Secondary service for loading config
|
# Secondary service for loading config
|
||||||
wgconf "$if"
|
if_wg_conf "$if"
|
||||||
}
|
}
|
||||||
|
|
||||||
new_if_vrf() {
|
new_if_vrf() {
|
||||||
|
@ -239,7 +239,7 @@ new_if_vrf() {
|
||||||
local table="${2:?missing table}"
|
local table="${2:?missing table}"
|
||||||
|
|
||||||
local sname="interface.$if.create"
|
local sname="interface.$if.create"
|
||||||
ifprepare "$if" "$sname"
|
bundle_stage_step_configure "$if" "$sname"
|
||||||
|
|
||||||
install -Dm644 <(
|
install -Dm644 <(
|
||||||
header_eb
|
header_eb
|
||||||
|
@ -266,7 +266,7 @@ new_if_vlan() {
|
||||||
local parent="$(echo $if | cut -d'-' -f1)"
|
local parent="$(echo $if | cut -d'-' -f1)"
|
||||||
|
|
||||||
local sname="interface.$if.create"
|
local sname="interface.$if.create"
|
||||||
ifprepare "$if" "$sname"
|
bundle_stage_step_configure "$if" "$sname"
|
||||||
|
|
||||||
install -Dm644 <(
|
install -Dm644 <(
|
||||||
header_eb
|
header_eb
|
||||||
|
@ -428,6 +428,26 @@ EOF
|
||||||
depends "$sname" interface."$if".create
|
depends "$sname" interface."$if".create
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if_dhcp() {
|
||||||
|
local if="${1:?missing if}"
|
||||||
|
|
||||||
|
local sname="interface.$if.dhcp"
|
||||||
|
bundle_stage_step_ready "$if" "$sname"
|
||||||
|
|
||||||
|
install -Dm755 <(
|
||||||
|
header_eb
|
||||||
|
header_path
|
||||||
|
header_if "$if"
|
||||||
|
cat <<EOF
|
||||||
|
fdmove -c 2 1
|
||||||
|
udhcpc -i \$INTERFACE -f -S
|
||||||
|
EOF
|
||||||
|
) rc/"$sname"/run
|
||||||
|
install -Dm644 <(echo longrun) rc/"$sname"/type
|
||||||
|
|
||||||
|
depends "$sname" interface."$if".link syslogd
|
||||||
|
}
|
||||||
|
|
||||||
if_ip_addr() {
|
if_ip_addr() {
|
||||||
local if="${1:?missing if}"
|
local if="${1:?missing if}"
|
||||||
local addr="${2:?missing addr}"
|
local addr="${2:?missing addr}"
|
||||||
|
@ -455,7 +475,7 @@ if_ip_addr() {
|
||||||
) rc/"$sname"/down
|
) rc/"$sname"/down
|
||||||
install -Dm644 <(echo oneshot) rc/"$sname"/type
|
install -Dm644 <(echo oneshot) rc/"$sname"/type
|
||||||
|
|
||||||
bundle_stage_step_ready "$sname"
|
depends "$sname" interface."$if".link
|
||||||
}
|
}
|
||||||
|
|
||||||
if_route_vrf_addr() {
|
if_route_vrf_addr() {
|
||||||
|
|
|
@ -35,7 +35,7 @@ new_if_vrf "$IFACE" 20
|
||||||
IFACE="vrf-v6"
|
IFACE="vrf-v6"
|
||||||
new_if_vrf "$IFACE" 10
|
new_if_vrf "$IFACE" 10
|
||||||
if_route_vrf_default_interface "$IFACE" "intersix"
|
if_route_vrf_default_interface "$IFACE" "intersix"
|
||||||
if_if_route_vrf_default_unreach "$IFACE" "2a04:5b81:2060::/48"
|
if_route_vrf_sink_unreach "$IFACE" "2a04:5b81:2060::/48"
|
||||||
if_slave "$IFACE" "intersix"
|
if_slave "$IFACE" "intersix"
|
||||||
if_slave "$IFACE" "b00b"
|
if_slave "$IFACE" "b00b"
|
||||||
if_slave "$IFACE" "f33d"
|
if_slave "$IFACE" "f33d"
|
||||||
|
@ -49,7 +49,8 @@ new_if_bridge "$IFACE"
|
||||||
if_bridge_property 'mcast_snooping' "$IFACE" '0' '' # TODO: Remove such entries when bridges play well with multicasting
|
if_bridge_property 'mcast_snooping' "$IFACE" '0' '' # TODO: Remove such entries when bridges play well with multicasting
|
||||||
if_bridge_property 'mcast_querier' "$IFACE"
|
if_bridge_property 'mcast_querier' "$IFACE"
|
||||||
if_bridge_property 'mcast_mld_version' "$IFACE" '2' ''
|
if_bridge_property 'mcast_mld_version' "$IFACE" '2' ''
|
||||||
new_forward "$IFACE"
|
if_dhcp "$IFACE"
|
||||||
|
if_forward "$IFACE"
|
||||||
if_slave "$IFACE" "vnet1"
|
if_slave "$IFACE" "vnet1"
|
||||||
if_slave "$IFACE" "phys3"
|
if_slave "$IFACE" "phys3"
|
||||||
if_slave "$IFACE" "phys2"
|
if_slave "$IFACE" "phys2"
|
||||||
|
|
Loading…
Reference in New Issue