Mageia Bugzilla – Attachment 5772 Details for
Bug 14904
Share the Internet connection with other local machines: problems with squid and shorewall
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
patch to fix #14904
drakgw-mga14904.patch (text/plain), 1.44 KB, created by
AL13N
on 2014-12-30 12:38:58 CET
(
hide
)
Description:
patch to fix #14904
Filename:
MIME Type:
Creator:
AL13N
Created:
2014-12-30 12:38:58 CET
Size:
1.44 KB
patch
obsolete
>diff --git a/bin/drakgw b/bin/drakgw >index 76532bd..3f90407 100755 >--- a/bin/drakgw >+++ b/bin/drakgw >@@ -125,6 +125,8 @@ What would you like to do?"); #- FIXME : not used for now > data => [ { label => N("Net Device"), val => \$shorewall->{masq}{net_interface}, list => [ sort keys %{$net->{ifcfg}} ], format => sub { network::tools::get_interface_description($net, $_[0]) } } ], > post => sub { > network::shorewall::add_interface_to_net_zone($shorewall, $shorewall->{masq}{net_interface}); >+ # filter out the chosen net interface from loc_zone >+ $shorewall->{loc_zone} = [ grep {!/^$shorewall->{masq}{net_interface}$/} @{$shorewall->{loc_zone}} ]; > # if loc_zone is unconfigured and has no interfaces, have all interfaces be local (except the chosen net interface) > $shorewall->{loc_zone} = [ sort grep {!/^$shorewall->{masq}{net_interface}$/} keys %{$net->{ifcfg}} ] if scalar(@{$shorewall->{loc_zone}}) == 0; > my $locals = @{$shorewall->{loc_zone}}; >@@ -170,6 +172,9 @@ configuring Internet Connection sharing.", format_interfaces($lan_interface_name > lan_configure => > { > pre => sub { >+ # filter out loc_zone interfaces from net_zone >+ for my $loc_if (@{$shorewall->{loc_zone}}) { >+ $shorewall->{net_zone} = [ grep {!/^$loc_if$/} @{$shorewall->{net_zone}} ]; > $lan_intf = $net->{ifcfg}{$lan_interface_name} ||= {}; > $lan_intf->{DEVICE} = $lan_interface_name; > $lan_intf->{ONBOOT} = 'yes';
diff --git a/bin/drakgw b/bin/drakgw index 76532bd..3f90407 100755 --- a/bin/drakgw +++ b/bin/drakgw @@ -125,6 +125,8 @@ What would you like to do?"); #- FIXME : not used for now data => [ { label => N("Net Device"), val => \$shorewall->{masq}{net_interface}, list => [ sort keys %{$net->{ifcfg}} ], format => sub { network::tools::get_interface_description($net, $_[0]) } } ], post => sub { network::shorewall::add_interface_to_net_zone($shorewall, $shorewall->{masq}{net_interface}); + # filter out the chosen net interface from loc_zone + $shorewall->{loc_zone} = [ grep {!/^$shorewall->{masq}{net_interface}$/} @{$shorewall->{loc_zone}} ]; # if loc_zone is unconfigured and has no interfaces, have all interfaces be local (except the chosen net interface) $shorewall->{loc_zone} = [ sort grep {!/^$shorewall->{masq}{net_interface}$/} keys %{$net->{ifcfg}} ] if scalar(@{$shorewall->{loc_zone}}) == 0; my $locals = @{$shorewall->{loc_zone}}; @@ -170,6 +172,9 @@ configuring Internet Connection sharing.", format_interfaces($lan_interface_name lan_configure => { pre => sub { + # filter out loc_zone interfaces from net_zone + for my $loc_if (@{$shorewall->{loc_zone}}) { + $shorewall->{net_zone} = [ grep {!/^$loc_if$/} @{$shorewall->{net_zone}} ]; $lan_intf = $net->{ifcfg}{$lan_interface_name} ||= {}; $lan_intf->{DEVICE} = $lan_interface_name; $lan_intf->{ONBOOT} = 'yes';
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 14904
:
5765
|
5766
| 5772