From da4f7ee524e27d44126bfa6c7eb37b25d3af8fcb Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 16 Aug 2012 06:59:35 -0700 Subject: [PATCH] Handle ppp devices correctly in the 'enable' command. Signed-off-by: Tom Eastep --- Shorewall/Perl/lib.core | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/lib.core b/Shorewall/Perl/lib.core index 3a3167db8..ea554a637 100644 --- a/Shorewall/Perl/lib.core +++ b/Shorewall/Perl/lib.core @@ -916,7 +916,12 @@ add_gateway() # $1 = Delta $2 = Table Number delta=$1 if ! echo $route | fgrep -q ' nexthop '; then - route=`echo $route | sed 's/via/nexthop via/'` + if echo $route | fgrep -q via; then + route=`echo $route | sed 's/via/nexthop via/'` + else + route="nexthop $route" + fi + dev=$(find_device $route) if [ -f ${VARDIR}/${dev}_weight ]; then weight=`cat ${VARDIR}/${dev}_weight`