Fix some wrong fields and add dhcp definition

This commit is contained in:
Alex D. 2023-10-15 12:21:58 +00:00
parent 7f65658cb6
commit 6d8cd3530f
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
4 changed files with 33 additions and 10 deletions

View File

@ -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_querier' "$IFACE"
if_bridge_property 'mcast_mld_version' "$IFACE" '2' ''
new_forward "$IFACE"
if_forward "$IFACE"
if_dhcp "$IFACE"
if_slave "$IFACE" "vnet0"
new_if_phys "vnet0"
@ -30,20 +31,20 @@ new_if_vrf "$VRF" 20
IFACE="tristan"
if_slave "$VRF" "$IFACE"
new_if_wg "$IFACE"
new_forward "$IFACE"
if_forward "$IFACE"
if_ip_addr "$IFACE" "fe80::1/64"
if_route_vrf_addr "$VRF" "$IFACE" "2a04:5b81:2010::/48"
IFACE="gustav"
if_slave "$VRF" "$IFACE"
new_if_wg "$IFACE"
new_forward "$IFACE"
if_forward "$IFACE"
if_ip_addr "$IFACE" "fe80::1/64"
if_route_vrf_addr "$VRF" "$IFACE" "2a04:5b81:2011::/48"
IFACE="caskd"
if_slave "$VRF" "$IFACE"
new_if_wg "$IFACE"
new_forward "$IFACE"
if_forward "$IFACE"
if_ip_addr "$IFACE" "fe80::1/64"
if_route_vrf_addr "$VRF" "$IFACE" "2a04:5b81:2060::/48"

View File

@ -11,4 +11,5 @@ new_if_bridge "$IFACE"
if_bridge_property 'mcast_snooping' "$IFACE" '0' ''
if_bridge_property 'mcast_querier' "$IFACE"
if_bridge_property 'mcast_mld_version' "$IFACE" '2' ''
if_dhcp "$IFACE"
if_slave "$IFACE" "eth0"

View File

@ -231,7 +231,7 @@ new_if_wg() {
new_link "$if"
# Secondary service for loading config
wgconf "$if"
if_wg_conf "$if"
}
new_if_vrf() {
@ -239,7 +239,7 @@ new_if_vrf() {
local table="${2:?missing table}"
local sname="interface.$if.create"
ifprepare "$if" "$sname"
bundle_stage_step_configure "$if" "$sname"
install -Dm644 <(
header_eb
@ -266,7 +266,7 @@ new_if_vlan() {
local parent="$(echo $if | cut -d'-' -f1)"
local sname="interface.$if.create"
ifprepare "$if" "$sname"
bundle_stage_step_configure "$if" "$sname"
install -Dm644 <(
header_eb
@ -428,6 +428,26 @@ EOF
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() {
local if="${1:?missing if}"
local addr="${2:?missing addr}"
@ -455,7 +475,7 @@ if_ip_addr() {
) rc/"$sname"/down
install -Dm644 <(echo oneshot) rc/"$sname"/type
bundle_stage_step_ready "$sname"
depends "$sname" interface."$if".link
}
if_route_vrf_addr() {

View File

@ -35,7 +35,7 @@ new_if_vrf "$IFACE" 20
IFACE="vrf-v6"
new_if_vrf "$IFACE" 10
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" "b00b"
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_querier' "$IFACE"
if_bridge_property 'mcast_mld_version' "$IFACE" '2' ''
new_forward "$IFACE"
if_dhcp "$IFACE"
if_forward "$IFACE"
if_slave "$IFACE" "vnet1"
if_slave "$IFACE" "phys3"
if_slave "$IFACE" "phys2"