summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/vrf.py4
-rwxr-xr-xsrc/init/vyos-router5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py
index 39f55e724..1eacba112 100755
--- a/src/conf_mode/vrf.py
+++ b/src/conf_mode/vrf.py
@@ -240,7 +240,7 @@ def apply(vrf):
vrf_iface.set_dhcpv6(False)
# Remove nftables conntrack zone map item
- nft_del_element = f'delete element inet vrf_zones ct_iface_map {{ "{tmp}" }}'
+ nft_del_element = f'delete element inet vrf_zones ct_iface_map {{ \'"{tmp}"\' }}'
# Check if deleting is possible first to avoid raising errors
_, err = popen(f'nft --check {nft_del_element}')
if not err:
@@ -320,7 +320,7 @@ def apply(vrf):
state = 'down' if 'disable' in config else 'up'
vrf_if.set_admin_state(state)
# Add nftables conntrack zone map item
- nft_add_element = f'add element inet vrf_zones ct_iface_map {{ "{name}" : {table} }}'
+ nft_add_element = f'add element inet vrf_zones ct_iface_map {{ \'"{name}"\' : {table} }}'
cmd(f'nft {nft_add_element}')
# Only call into nftables as long as there is nothing setup to avoid wasting
diff --git a/src/init/vyos-router b/src/init/vyos-router
index f93e360da..563f12755 100755
--- a/src/init/vyos-router
+++ b/src/init/vyos-router
@@ -420,7 +420,10 @@ gen_duid ()
UUID=$(cat ${UUID_FILE} | tr -d -)
fi
if [ -z ${UUID} ]; then
- UUID=$(uuidgen --sha1 --namespace @dns --name $(cat ${UUID_FILE_ALT}) | tr -d -)
+ file_alt="$(cat ${UUID_FILE_ALT})"
+ if [ -n "${file_alt}" ]; then
+ UUID=$(uuidgen --sha1 --namespace @dns --name ${file_alt} | tr -d -)
+ fi
fi
# Add DUID type4 (UUID) information
DUID_TYPE="0004"