[bird_radv] Add option to include MTU in RAs.
This commit is contained in:
parent
6310db7301
commit
55f37b9792
4 changed files with 18 additions and 3 deletions
|
@ -15,12 +15,17 @@ autoconfigure IPv6 hosts, this type is a rudimentary implementation to generate
|
||||||
configuration for Bird to do so.
|
configuration for Bird to do so.
|
||||||
|
|
||||||
|
|
||||||
REQUIRED MULTIPLE PARAMETERS
|
REQUIRED PARAMETERS
|
||||||
----------------------------
|
-------------------
|
||||||
interface
|
interface
|
||||||
The interfaces to activate the protocol on. RAs will be sent using the
|
The interfaces to activate the protocol on. RAs will be sent using the
|
||||||
prefixes configured on these interfaces.
|
prefixes configured on these interfaces.
|
||||||
|
|
||||||
|
OPTIONAL PARAMETERS
|
||||||
|
-------------------
|
||||||
|
mtu
|
||||||
|
An optional MTU setting to include in the router advertisements.
|
||||||
|
|
||||||
|
|
||||||
OPTIONAL MULTIPLE PARAMETERS
|
OPTIONAL MULTIPLE PARAMETERS
|
||||||
----------------------------
|
----------------------------
|
||||||
|
@ -41,6 +46,7 @@ EXAMPLES
|
||||||
|
|
||||||
__bird_radv datacenter \
|
__bird_radv datacenter \
|
||||||
--interface eth1 \
|
--interface eth1 \
|
||||||
|
--mtu 9000 \
|
||||||
--route ::/0 \
|
--route ::/0 \
|
||||||
--ns 2001:DB8:cafe::4 \
|
--ns 2001:DB8:cafe::4 \
|
||||||
--ns 2001:DB8:cafe::14 \
|
--ns 2001:DB8:cafe::14 \
|
||||||
|
|
|
@ -55,6 +55,12 @@ then
|
||||||
DNSSL=$(sed -e 's/^/\tdnssl "/' -e 's/$/";/' "${__object:?}/parameter/dnssl")
|
DNSSL=$(sed -e 's/^/\tdnssl "/' -e 's/$/";/' "${__object:?}/parameter/dnssl")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
MTU=
|
||||||
|
if [ -f "${__object:?}/parameter/mtu" ];
|
||||||
|
then
|
||||||
|
MTU=$(cat "${__object:?}/parameter/mtu")
|
||||||
|
fi
|
||||||
|
|
||||||
__file "${confdir:?}/radv-${__object_id:?}.conf" \
|
__file "${confdir:?}/radv-${__object_id:?}.conf" \
|
||||||
--mode 0640 --owner root --group bird \
|
--mode 0640 --owner root --group bird \
|
||||||
--source - << EOF
|
--source - << EOF
|
||||||
|
@ -71,7 +77,9 @@ protocol radv ${__object_id:?} {
|
||||||
propagate routes ${have_routes:?};
|
propagate routes ${have_routes:?};
|
||||||
ipv6 { table radv_routes; export all; };
|
ipv6 { table radv_routes; export all; };
|
||||||
|
|
||||||
$(sed -e 's/^/\tinterface "/' -e 's/$/";/' "${__object:?}/parameter/interface")
|
interface "$(cat "${__object:?}/parameter/interface")" {
|
||||||
|
$MTU
|
||||||
|
};
|
||||||
|
|
||||||
$RDNS
|
$RDNS
|
||||||
|
|
||||||
|
|
1
type/__bird_radv/parameter/optional
Normal file
1
type/__bird_radv/parameter/optional
Normal file
|
@ -0,0 +1 @@
|
||||||
|
mtu
|
Loading…
Add table
Reference in a new issue