summaryrefslogtreecommitdiff
path: root/src/etc/dhcp/dhclient-enter-hooks.d/03-vyos-ipwrapper
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-08-16 14:27:03 +0200
committerChristian Poessinger <christian@poessinger.com>2020-08-16 14:33:16 +0200
commitb17b8a0129f42c757c1e9a740664406e8da3dd42 (patch)
tree54912f1b9b9c2198c55ec617a1260ab1bc9acdb0 /src/etc/dhcp/dhclient-enter-hooks.d/03-vyos-ipwrapper
parent3104c0ea8284ac5039e1dbab4a3ccd193e748ede (diff)
downloadvyos-1x-b17b8a0129f42c757c1e9a740664406e8da3dd42.tar.gz
vyos-1x-b17b8a0129f42c757c1e9a740664406e8da3dd42.zip
dhclient: T2277: remove VRF route when DHCP client exits
Diffstat (limited to 'src/etc/dhcp/dhclient-enter-hooks.d/03-vyos-ipwrapper')
-rw-r--r--src/etc/dhcp/dhclient-enter-hooks.d/03-vyos-ipwrapper2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/etc/dhcp/dhclient-enter-hooks.d/03-vyos-ipwrapper b/src/etc/dhcp/dhclient-enter-hooks.d/03-vyos-ipwrapper
index 1e102c2d7..d1161e704 100644
--- a/src/etc/dhcp/dhclient-enter-hooks.d/03-vyos-ipwrapper
+++ b/src/etc/dhcp/dhclient-enter-hooks.d/03-vyos-ipwrapper
@@ -20,7 +20,6 @@ function iptovtysh () {
local VTYSH_NETADDR=""
local VTYSH_GATEWAY=""
local VTYSH_DEV=""
- local VTYSH_VRF_NAME=$(basename /sys/class/net/eth1/upper_* | sed -e 's/upper_//')
# convert default route to 0.0.0.0/0
if [ "$4" == "default" ] ; then
VTYSH_NETADDR="0.0.0.0/0"
@@ -43,6 +42,7 @@ function iptovtysh () {
fi
# Add route to VRF routing table
+ local VTYSH_VRF_NAME=$(basename /sys/class/net/$VTYSH_DEV/upper_* | sed -e 's/upper_//')
if [ -n $VTYSH_VRF_NAME ]; then
VTYSH_VRF="vrf $VTYSH_VRF_NAME"
fi