From ff6c8c693d3f3e5b1702314087dfb2843448902c Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Wed, 28 May 2008 13:14:57 -0700 Subject: Bugfix: 3019 Tighten up validity check on interface names. --- .../static/interface-route/node.tag/next-hop-interface/node.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates/protocols/static') diff --git a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def index 80526635..c83201a8 100644 --- a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def +++ b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def @@ -18,7 +18,7 @@ help: Set the next-hop interface # syntax:expression: exec " \ IFNAME=$VAR(@) ; \ - if [ -z \"`ip addr | grep $IFNAME `\" ]; then \ + if [ ! -e /sys/class/net/$IFNAME ]; then \ if [ \"${IFNAME::5}\" != \"pppoa\" -a \"${IFNAME::5}\" != \"pppoe\" \ -a \"${IFNAME::3}\" != \"wan\" \ -a \"${IFNAME::2}\" != \"ml\" ]; then \ -- cgit v1.2.3