diff options
author | Christian Breunig <christian@breunig.cc> | 2023-08-28 21:21:14 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2023-08-28 21:21:14 +0200 |
commit | 47d9c8067135b97bc1fbc5450dc5fa9b8e65e345 (patch) | |
tree | ac6f7858775346329d3b8c004b552209c12ad513 /data/templates/dhcp-client/ipv6.override.conf.j2 | |
parent | 396329cc9a2419c5be8ddd0bc8fbde67fdcb03fa (diff) | |
download | vyos-1x-47d9c8067135b97bc1fbc5450dc5fa9b8e65e345.tar.gz vyos-1x-47d9c8067135b97bc1fbc5450dc5fa9b8e65e345.zip |
T5428: fix DHCP address renewal/release when running in VRF
Diffstat (limited to 'data/templates/dhcp-client/ipv6.override.conf.j2')
-rw-r--r-- | data/templates/dhcp-client/ipv6.override.conf.j2 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/data/templates/dhcp-client/ipv6.override.conf.j2 b/data/templates/dhcp-client/ipv6.override.conf.j2 new file mode 100644 index 000000000..47e48e86f --- /dev/null +++ b/data/templates/dhcp-client/ipv6.override.conf.j2 @@ -0,0 +1,10 @@ +{% set vrf_command = 'ip vrf exec ' ~ vrf ~ ' ' if vrf is defined and vrf is not none else '' %} +{% set no_release = '-n' if dhcpv6_options is defined and dhcpv6_options.no_release is defined and dhcpv6_options.no_release is not none else '' %} +{% set dhcp6c_options = '-D -k /run/dhcp6c/dhcp6c.' ~ ifname ~ '.sock -c /run/dhcp6c/dhcp6c.' ~ ifname ~ '.conf -p /run/dhcp6c/dhcp6c.' ~ ifname ~ '.pid ' ~ no_release %} + +[Unit] +ConditionPathExists=/run/dhcp6c/dhcp6c.{{ ifname }}.conf + +[Service] +ExecStart= +ExecStart={{ vrf_command }}/usr/sbin/dhcp6c {{ dhcp6c_options }} {{ ifname }}
\ No newline at end of file |