From 8ac75ae86c54fb931d6e61320b7b973eaa1841c5 Mon Sep 17 00:00:00 2001 From: DmitriyEshenko Date: Wed, 19 Jan 2022 13:04:07 +0000 Subject: T3522: Use printf to get hex instead of dc --- .../static/table/node.tag/route/node.tag/dhcp-interface/node.def | 6 +++--- 1 file 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 -- cgit v1.2.3