On 2/3/11 1:19 AM, Sander Klein wrote: > Hi, > > I seem to have a problem with tcfilters in shorewall6. I try to put > traffic which belongs to my own subnet in bucket 1:10 or 2:10 but it > seems to fail. > > What I'm trying to do in tcfilters is the following: > > 2:10 2001:67c:1e8::/48 2001:67c:1e8::/48 tcp - - > 1:10 2001:67c:1e8::/48 2001:67c:1e8::/48 tcp - - > > I'm using shorewall 4.4.16.1.
Hi Sander,
Please try the attached patch:
patch /usr/share/shorewall/Shorewall/IPAddrs.pm < IPADDRS.patch
Thanks!
-Tom
--
Tom Eastep \ When I die, I want to go like my Grandfather who
Shoreline, \ died peacefully in his sleep. Not screaming like
Washington, USA \ all of the passengers in his car
http://shorewall.net \________________________________________________
diff --git a/Shorewall/Perl/Shorewall/IPAddrs.pm
b/Shorewall/Perl/Shorewall/IPAddrs.pm
index eef06db..1aafa52 100644
--- a/Shorewall/Perl/Shorewall/IPAddrs.pm
+++ b/Shorewall/Perl/Shorewall/IPAddrs.pm
@@ -280,7 +280,7 @@ sub decompose_net( $ ) {
my $net = $_[0];
( $net, my $vlsm ) = validate_net( $net , 0 );
- ( encodeaddr( $net) , $vlsm );
+ ( ( $family == F_IPV4 ? encodeaddr( $net) : $net ) , $vlsm );
}
@@ -587,6 +587,15 @@ sub validate_6net( $$ ) {
fatal_error "Invalid Network address ($_[0])" if $_[0] =~ '/' || !
defined $net;
validate_6address $net, $allow_name;
}
+
+ if ( defined wantarray ) {
+ assert ( ! $allow_name );
+ if ( wantarray ) {
+ ( $net , $vlsm );
+ } else {
+ "$net/$vlsm";
+ }
+ }
}
#
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________ Shorewall-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shorewall-users
