diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 6f533ad7b..0be88831a 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -707,7 +707,9 @@ sub macro_comment( $ ) { # Functions to manipulate cmdlevel # sub incr_cmd_level( $ ) { - $_[0]->{cmdlevel}++; + my $chain = $_[0]; + $chain->{cmdlevel}++; + $chain->{optflags} |= ( DONT_OPTIMIZE | DONT_MOVE ); } sub decr_cmd_level( $ ) { @@ -1021,6 +1023,7 @@ sub add_commands ( $$;@ ) { } for @_; $chainref->{referenced} = 1; + $chainref->{optflags} |= ( DONT_OPTIMIZE | DONT_MOVE ); } # diff --git a/Shorewall/Samples/one-interface/interfaces b/Shorewall/Samples/one-interface/interfaces index c1e12a113..789388943 100644 --- a/Shorewall/Samples/one-interface/interfaces +++ b/Shorewall/Samples/one-interface/interfaces @@ -14,4 +14,4 @@ FORMAT 2 ############################################################################### #ZONE INTERFACE OPTIONS -net eth0 dhcp,tcpflags,logmartians,nosmurfs +net eth0 dhcp,tcpflags,logmartians,nosmurfs,sourceroute=0 diff --git a/Shorewall/Samples/three-interfaces/interfaces b/Shorewall/Samples/three-interfaces/interfaces index d455a4c8b..fa9c35a59 100644 --- a/Shorewall/Samples/three-interfaces/interfaces +++ b/Shorewall/Samples/three-interfaces/interfaces @@ -14,6 +14,6 @@ FORMAT 2 ############################################################################### #ZONE INTERFACE OPTIONS -net eth0 tcpflags,dhcp,nosmurfs,routefilter,logmartians +net eth0 tcpflags,dhcp,nosmurfs,routefilter,logmartians,sourceroute=0 loc eth1 tcpflags,nosmurfs,routefilter,logmartians dmz eth2 tcpflags,nosmurfs,routefilter,logmartians diff --git a/Shorewall/Samples/two-interfaces/interfaces b/Shorewall/Samples/two-interfaces/interfaces index 74e06cb6b..6df4ab365 100644 --- a/Shorewall/Samples/two-interfaces/interfaces +++ b/Shorewall/Samples/two-interfaces/interfaces @@ -14,5 +14,5 @@ FORMAT 2 ############################################################################### #ZONE INTERFACE OPTIONS -net eth0 dhcp,tcpflags,nosmurfs,routefilter,logmartians +net eth0 dhcp,tcpflags,nosmurfs,routefilter,logmartians,sourceroute=0 loc eth1 tcpflags,nosmurfs,routefilter,logmartians diff --git a/Shorewall6/Samples6/Universal/interfaces b/Shorewall6/Samples6/Universal/interfaces index 71be605e6..b86de5541 100644 --- a/Shorewall6/Samples6/Universal/interfaces +++ b/Shorewall6/Samples6/Universal/interfaces @@ -11,5 +11,5 @@ FORMAT 2 ############################################################################### #ZONE INTERFACE OPTIONS - lo ignore -net all dhcp,physical=+,routeback +net all dhcp,physical=+,routeback,sourceroute=0 diff --git a/Shorewall6/Samples6/three-interfaces/interfaces b/Shorewall6/Samples6/three-interfaces/interfaces index 393c544ed..a3499651d 100644 --- a/Shorewall6/Samples6/three-interfaces/interfaces +++ b/Shorewall6/Samples6/three-interfaces/interfaces @@ -14,6 +14,6 @@ FORMAT 2 ############################################################################### #ZONE INTERFACE OPTIONS -net eth0 tcpflags,forward=1 +net eth0 tcpflags,forward=1,sourceroute=0 loc eth1 tcpflags,forward=1 dmz eth2 tcpflags,forward=1 diff --git a/Shorewall6/Samples6/two-interfaces/interfaces b/Shorewall6/Samples6/two-interfaces/interfaces index f3a75582c..c15c0a4ee 100644 --- a/Shorewall6/Samples6/two-interfaces/interfaces +++ b/Shorewall6/Samples6/two-interfaces/interfaces @@ -14,5 +14,5 @@ FORMAT 2 ############################################################################### #ZONE INTERFACE OPTIONS -net eth0 tcpflags,forward=1 +net eth0 tcpflags,forward=1,sourceroute=0 loc eth1 tcpflags,forward=1