Skip to content

Commit

Permalink
Merge branch 'Code-11-SP2' into Code-11-SP3
Browse files Browse the repository at this point in the history
Conflicts:
	VERSION
	package/yast2-network.changes
	src/lan/YaPI/NETWORK.pm
	src/lan/address.ycp
	src/lan/complex.ycp
	src/modules/LanItems.ycp
	src/routines/widgets.ycp
	testsuite/tests/bond.out
	testsuite/tests/bond.ycp
  • Loading branch information
mchf committed Nov 11, 2013
2 parents 8e49f58 + 8701418 commit d74028e
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.17.196
2.17.197
10 changes: 10 additions & 0 deletions package/yast2-network.changes
@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Jul 29 18:08:19 CEST 2013 - locilka@suse.com

- Fixed detection whether interface is handled by firewall and thus
fixed accidental stopping and disabling the firewall services.
Added detection of interfaces handled by implicit assignment
with 'any' in firewall zone.
(bnc#829556)
- 2.17.197

-------------------------------------------------------------------
Wed Sep 4 08:59:44 UTC 2013 - mfilka@suse.com

Expand Down
8 changes: 8 additions & 0 deletions src/modules/Host.ycp
Expand Up @@ -187,6 +187,14 @@ global define boolean Write() {

SCR::Write(.etc.hosts, nil);
sleep(sl);

/*
* Reset nscd cache.
* Workaround due to buggy inotify implementation in nscd.
* See bnc#779531.
*/
SCR::Execute( .target.bash, "nscd -i hosts");

Progress::NextStage();
return ret == true;
}
Expand Down
23 changes: 22 additions & 1 deletion src/modules/SuSEFirewall4Network.ycp
Expand Up @@ -121,6 +121,27 @@
return (zoi == nil)? "": zoi;
}

/**
* Returns whether any network interfaces are handled firewall either
* explicitly mentioning them in any firewall zone or implicitly
* by using string 'any' in firewall zones that would assign any interface
* unassigned to any zone to that zone as a fallback.
*
* @return boolean if any interface is handled by firewall
*/
boolean AnyInterfacesHandledByFirewall () {
list <string> interfaces = [];

foreach (string zone, SuSEFirewall::GetKnownFirewallZones(), {
interfaces = (list <string>) union(
interfaces,
SuSEFirewall::GetInterfacesInZoneSupportingAnyFeature(zone)
);
});

return (size(interfaces) > 0);
}

/**
* Functions sets protection of interface by the protect-status.<br>
* protect==true -> add interface into selected firewall zone, sets firewall
Expand Down Expand Up @@ -149,7 +170,7 @@
});
// if there are no other interfaces in configuration, stop firewall
// and remove it from boot process
if (size(SuSEFirewall::GetFirewallInterfaces())==0) {
if (!AnyInterfacesHandledByFirewall()) {
y2milestone("Disabling firewall, no interfaces are protected.");
SuSEFirewall::SetEnableService(false);
SuSEFirewall::SetStartService(false);
Expand Down

0 comments on commit d74028e

Please sign in to comment.