diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-04-15 08:34:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-15 08:34:58 +0200 |
commit | 7a48396731ff41007c083440e2aae01dda747e72 (patch) | |
tree | 6109cb02589d2c2870f7aa0c7188f6099c8a0bc6 /src/etc/dhcp/dhclient-exit-hooks.d/01-vyos-cleanup | |
parent | bafdc46e7af94b32aa3fed90c287ac170d764b7d (diff) | |
parent | 9ec8e2b6dc8144d4d5a17e53b1c183e22497580f (diff) | |
download | vyos-1x-7a48396731ff41007c083440e2aae01dda747e72.tar.gz vyos-1x-7a48396731ff41007c083440e2aae01dda747e72.zip |
Merge pull request #807 from zdc/T3392-sagitta
dhclient: T3392: Changed dhclient-script hooks for VRF
Diffstat (limited to 'src/etc/dhcp/dhclient-exit-hooks.d/01-vyos-cleanup')
-rw-r--r-- | src/etc/dhcp/dhclient-exit-hooks.d/01-vyos-cleanup | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/etc/dhcp/dhclient-exit-hooks.d/01-vyos-cleanup b/src/etc/dhcp/dhclient-exit-hooks.d/01-vyos-cleanup index edb7c7b27..694d53b6b 100644 --- a/src/etc/dhcp/dhclient-exit-hooks.d/01-vyos-cleanup +++ b/src/etc/dhcp/dhclient-exit-hooks.d/01-vyos-cleanup @@ -17,14 +17,8 @@ if [[ $reason =~ (EXPIRE|FAIL|RELEASE|STOP) ]]; then # try to delete default ip route for router in $old_routers; do - # check if we are bound to a VRF - local vrf_name=$(basename /sys/class/net/${interface}/upper_* | sed -e 's/upper_//') - if [ -n $vrf_name ]; then - vrf="vrf $vrf_name" - fi - - logmsg info "Deleting default route: via $router dev ${interface} ${if_metric:+metric $if_metric} ${vrf}" - ip -4 route del default via $router dev ${interface} ${if_metric:+metric $if_metric} ${vrf} + logmsg info "Deleting default route: via $router dev ${interface} ${if_metric:+metric $if_metric}" + ip -4 route del default via $router dev ${interface} ${if_metric:+metric $if_metric} if_metric=$((if_metric+1)) done |