From ce1c98821cfcda45db09050e8dcf505f4150ba51 Mon Sep 17 00:00:00 2001 From: teastep Date: Mon, 9 Apr 2007 19:33:30 +0000 Subject: [PATCH] More OpenVPN fixes git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5879 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Tunnels.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Shorewall-perl/Shorewall/Tunnels.pm b/Shorewall-perl/Shorewall/Tunnels.pm index 8b58556e0..d7edbcc04 100644 --- a/Shorewall-perl/Shorewall/Tunnels.pm +++ b/Shorewall-perl/Shorewall/Tunnels.pm @@ -128,7 +128,11 @@ sub setup_tunnels() { $port = $p; $protocol = $proto; } elsif ( $proto ) { - $protocol = $proto; + if ( "\L$proto" =~ /udp|tcp/ ) { + $protocol = $proto; + } else { + $port = $proto; + } } add_rule $inchainref, "-p $protocol $source --dport $port -j ACCEPT"; @@ -147,7 +151,11 @@ sub setup_tunnels() { $port = $p; $protocol = $proto; } elsif ( $proto ) { - $protocol = $proto; + if ( "\L$proto" =~ /udp|tcp/ ) { + $protocol = $proto; + } else { + $port = $proto; + } } add_rule $inchainref, "-p $protocol $source --sport $port -j ACCEPT";