summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2022-01-19 20:14:25 +0700
committerGitHub <noreply@github.com>2022-01-19 20:14:25 +0700
commitd4097690c40f619bc0e78a0d674985f7880a19a3 (patch)
tree12d8553129d0bc48b134327aebf4dd96b15b5513
parent32cbb1e5059c6c27449b7013f790aff1c50a9831 (diff)
parent8ac75ae86c54fb931d6e61320b7b973eaa1841c5 (diff)
downloadvyatta-cfg-quagga-d4097690c40f619bc0e78a0d674985f7880a19a3.tar.gz
vyatta-cfg-quagga-d4097690c40f619bc0e78a0d674985f7880a19a3.zip
Merge pull request #95 from DmitriyEshenko/T35221.3.2
T3522: Use printf to get hex instead of dc
-rw-r--r--templates/protocols/static/table/node.tag/route/node.tag/dhcp-interface/node.def6
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/protocols/static/table/node.tag/route/node.tag/dhcp-interface/node.def b/templates/protocols/static/table/node.tag/route/node.tag/dhcp-interface/node.def
index 3f0afdb1..6f8adb31 100644
--- a/templates/protocols/static/table/node.tag/route/node.tag/dhcp-interface/node.def
+++ b/templates/protocols/static/table/node.tag/route/node.tag/dhcp-interface/node.def
@@ -17,7 +17,7 @@ create:
if [ "$route" == "0.0.0.0/0" ]; then
LIP=$(/opt/vyatta/sbin/vyatta-dhcp-helper.pl --interface=$ifc --want=local)
if [ "$LIP" != "127.0.0.1" ]; then
- MARK=$(dc 0x7fffffff $table + p)
+ MARK=`printf "0x%x" $((2147483647+$table))`
sudo /sbin/iptables -t mangle -I OUTPUT -s $LIP/32 -j MARK --set-mark $MARK
fi
fi
@@ -34,7 +34,7 @@ update:
if [ "$route" == "0.0.0.0/0" ]; then
LIP=$(/opt/vyatta/sbin/vyatta-dhcp-helper.pl --interface=$ifc --want=local)
if [ "$LIP" != "127.0.0.1" ]; then
- MARK=$(dc 0x7fffffff $table + p)
+ MARK=`printf "0x%x" $((2147483647+$table))`
sudo /sbin/iptables -t mangle -I OUTPUT -s $LIP/32 -j MARK --set-mark $MARK
fi
fi
@@ -51,7 +51,7 @@ delete:
if [ "$route" == "0.0.0.0/0" ]; then
LIP=$(/opt/vyatta/sbin/vyatta-dhcp-helper.pl --interface=$ifc --want=local)
if [ "$LIP" != "127.0.0.1" ]; then
- MARK=$(dc 0x7fffffff $table + p)
+ MARK=`printf "0x%x" $((2147483647+$table))`
sudo /sbin/iptables -t mangle -D OUTPUT -s $LIP/32 -j MARK --set-mark $MARK
fi
fi