diff options
author | Dmitri Toubelis <dtoubelis@users.noreply.github.com> | 2022-05-05 01:41:45 -0400 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-05-10 15:56:01 +0000 |
commit | 636e9dc5b2b8e8911ff8d704b553b8d285ad6f1e (patch) | |
tree | d80131d05ac9416a9931f81a5c9cfd91692c659d /src/etc | |
parent | 432fd1b5e7b5a1e5b8503bf0dcd106369e323dc7 (diff) | |
download | vyos-1x-636e9dc5b2b8e8911ff8d704b553b8d285ad6f1e.tar.gz vyos-1x-636e9dc5b2b8e8911ff8d704b553b8d285ad6f1e.zip |
T4405: Fix administrative distance of DHCP routes
- Default dhclient script only uses value of `$IF_MERIC` envvar for default route recived via `router` option.
- This variable has no effect on rotes received via `rfc3442-classless-static-routes` option
- Considering that Vyos overrrides `ip` command originating from `dhclient` this can be easily fixed in `iptovtysh()` function by using the `$IF_METRIC` envvar directly in the dhclient hook.
(cherry picked from commit 0c00e7bf8b6e68814607fde4ff0cd70ce9f4b486)
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/dhcp/dhclient-enter-hooks.d/03-vyos-ipwrapper | 2 |
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 74a7e83bf..5d879471d 100644 --- a/src/etc/dhcp/dhclient-enter-hooks.d/03-vyos-ipwrapper +++ b/src/etc/dhcp/dhclient-enter-hooks.d/03-vyos-ipwrapper @@ -26,7 +26,7 @@ function iptovtysh () { local VTYSH_GATEWAY="" local VTYSH_DEV="" local VTYSH_TAG="210" - local VTYSH_DISTANCE="" + local VTYSH_DISTANCE=$IF_METRIC # convert default route to 0.0.0.0/0 if [ "$4" == "default" ] ; then VTYSH_NETADDR="0.0.0.0/0" |