Hello community,

here is the log from the commit of package yast2-network for openSUSE:Factory 
checked in at 2015-08-10 09:09:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-network (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-network.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-network"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes      
2015-08-05 06:48:59.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-network.new/yast2-network.changes 
2015-08-10 09:09:41.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Aug  5 08:18:49 UTC 2015 - mfi...@suse.com
+
+- bnc#916013
+  - IPv6 forwarding setup is stored persistently
+- 3.1.124 
+
+-------------------------------------------------------------------

Old:
----
  yast2-network-3.1.123.tar.bz2

New:
----
  yast2-network-3.1.124.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.WNXvXS/_old  2015-08-10 09:09:42.000000000 +0200
+++ /var/tmp/diff_new_pack.WNXvXS/_new  2015-08-10 09:09:42.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        3.1.123
+Version:        3.1.124
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -95,7 +95,6 @@
 %{yast_agentdir}/ag_udev_persistent
 %{yast_schemadir}/autoyast/rnc/networking.rnc
 %{yast_schemadir}/autoyast/rnc/host.rnc
-%dir %{yast_libdir}/network
 %{yast_libdir}/network
 
 %dir %{yast_docdir}

++++++ yast2-network-3.1.123.tar.bz2 -> yast2-network-3.1.124.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.123/package/yast2-network.changes 
new/yast2-network-3.1.124/package/yast2-network.changes
--- old/yast2-network-3.1.123/package/yast2-network.changes     2015-07-31 
16:22:10.000000000 +0200
+++ new/yast2-network-3.1.124/package/yast2-network.changes     2015-08-07 
10:07:12.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Wed Aug  5 08:18:49 UTC 2015 - mfi...@suse.com
+
+- bnc#916013
+  - IPv6 forwarding setup is stored persistently
+- 3.1.124 
+
+-------------------------------------------------------------------
 Fri Jul 31 13:41:08 UTC 2015 - an...@suse.com
 
 - bnc#940192, bnc#935937
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.123/package/yast2-network.spec 
new/yast2-network-3.1.124/package/yast2-network.spec
--- old/yast2-network-3.1.123/package/yast2-network.spec        2015-07-31 
16:22:10.000000000 +0200
+++ new/yast2-network-3.1.124/package/yast2-network.spec        2015-08-07 
10:07:12.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        3.1.123
+Version:        3.1.124
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -93,7 +93,6 @@
 %{yast_agentdir}/ag_udev_persistent
 %{yast_schemadir}/autoyast/rnc/networking.rnc
 %{yast_schemadir}/autoyast/rnc/host.rnc
-%dir %{yast_libdir}/network
 %{yast_libdir}/network
 
 %dir %{yast_docdir}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.123/src/modules/Routing.rb 
new/yast2-network-3.1.124/src/modules/Routing.rb
--- old/yast2-network-3.1.123/src/modules/Routing.rb    2015-07-31 
16:22:10.000000000 +0200
+++ new/yast2-network-3.1.124/src/modules/Routing.rb    2015-08-07 
10:07:12.000000000 +0200
@@ -50,8 +50,13 @@
     # "routes" file location
     ROUTES_FILE = "/etc/sysconfig/network/routes"
 
-    SYSCTL_IPV4_PATH = ".etc.sysctl_conf.\"net.ipv4.ip_forward\""
-    SYSCTL_IPV6_PATH = ".etc.sysctl_conf.\"net.ipv6.conf.all.forwarding\""
+    # sysctl keys, used as *single* SCR path components below
+    IPV4_SYSCTL = "net.ipv4.ip_forward"
+    IPV6_SYSCTL = "net.ipv6.conf.all.forwarding"
+    # SCR paths
+    SYSCTL_AGENT_PATH = ".etc.sysctl_conf"
+    SYSCTL_IPV4_PATH = SYSCTL_AGENT_PATH + ".\"#{IPV4_SYSCTL}\""
+    SYSCTL_IPV6_PATH = SYSCTL_AGENT_PATH + ".\"#{IPV6_SYSCTL}\""
 
     # see man routes - difference on implicit device param (aka "-") in
     # case of /etc/sysconfig/network/routes and /etc/sysconfig/network/
@@ -137,54 +142,68 @@
       nil
     end
 
+    # Reads current status for both IPv4 and IPv6 forwarding
     def ReadIPForwarding
       if SuSEFirewall.IsEnabled
         @Forward_v4 = SuSEFirewall.GetSupportRoute
-        # FIXME: missing support for setting IPv6 forwarding enablement in
-        # SuSEFirewall module and in SuSEFirewall2 at all
       else
         @Forward_v4 = SCR.Read(path(SYSCTL_IPV4_PATH)) == "1"
-        @Forward_v6 = SCR.Read(path(SYSCTL_IPV6_PATH)) == "1"
       end
 
+      @Forward_v6 = SCR.Read(path(SYSCTL_IPV6_PATH)) == "1"
+
       log.info("Forward_v4=#{@Forward_v4}")
       log.info("Forward_v6=#{@Forward_v6}")
 
       nil
     end
 
-    def WriteIPForwarding
-      forward_ipv4 = @Forward_v4 ? "1" : "0"
-      forward_ipv6 = @Forward_v6 ? "1" : "0"
+    # Configures system for IPv4 forwarding
+    #
+    # @param [Boolean] true when forwarding should be enabled
+    def write_ipv4_forwarding(forward_ipv4)
+      sysctl_val = forward_ipv4 ? "1" : "0"
 
       if SuSEFirewall.IsEnabled
-        # FIXME: missing support for setting IPv6 forwarding enablement in
-        # SuSEFirewall module and in SuSEFirewall2 at all
-        SuSEFirewall.SetSupportRoute(@Forward_v4)
+        SuSEFirewall.SetSupportRoute(forward_ipv4)
       else
         SCR.Write(
           path(SYSCTL_IPV4_PATH),
-          forward_ipv4
-        )
-        SCR.Write(
-          path(SYSCTL_IPV6_PATH),
-          forward_ipv6
+          sysctl_val
         )
-        SCR.Write(path(".etc.sysctl_conf"), nil)
+        SCR.Write(path(SYSCTL_AGENT_PATH), nil)
+
+        SCR.Execute(path(".target.bash"), "sysctl -w 
#{IPV4_SYSCTL}=#{sysctl_val}")
       end
 
-      SCR.Execute(
-        path(".target.bash"),
-        "echo #{forward_ipv4} > /proc/sys/net/ipv4/ip_forward"
-      )
-      SCR.Execute(
-        path(".target.bash"),
-        "echo #{forward_ipv6} > /proc/sys/net/ipv6/conf/all/forwarding"
+      nil
+    end
+
+    # Configures system for IPv6 forwarding
+    #
+    # @param [Boolean] true when forwarding should be enabled
+    def write_ipv6_forwarding(forward_ipv6)
+      sysctl_val = forward_ipv6 ? "1" : "0"
+
+      # SuSEfirewall2 has no direct support for IPv6 (aka FW_FORWARD).
+      # Sysctl has to be configured manualy. bnc#916013
+      SCR.Write(
+        path(SYSCTL_IPV6_PATH),
+        sysctl_val
       )
+      SCR.Write(path(SYSCTL_AGENT_PATH), nil)
+
+      SCR.Execute(path(".target.bash"), "sysctl -w 
#{IPV6_SYSCTL}=#{sysctl_val}")
 
       nil
     end
 
+    # Configures system for both IPv4 and IPv6 forwarding
+    def WriteIPForwarding
+      write_ipv4_forwarding(@Forward_v4)
+      write_ipv6_forwarding(@Forward_v6)
+    end
+
     # Read routing settings
     # If no routes, sets a default gateway from Detection
     # @return true if success
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.123/test/routing_test.rb 
new/yast2-network-3.1.124/test/routing_test.rb
--- old/yast2-network-3.1.123/test/routing_test.rb      2015-07-31 
16:22:10.000000000 +0200
+++ new/yast2-network-3.1.124/test/routing_test.rb      2015-08-07 
10:07:12.000000000 +0200
@@ -23,21 +23,6 @@
       allow(Yast::SCR).to receive(:Execute) { nil }
     end
 
-    def fw_independent_write_expects
-      expect(Yast::SCR)
-        .to receive(:Execute)
-        .with(
-          path(".target.bash"),
-          "echo #{@value4} > /proc/sys/net/ipv4/ip_forward"
-        )
-      expect(Yast::SCR)
-        .to receive(:Execute)
-        .with(
-          path(".target.bash"),
-          "echo #{@value6} > /proc/sys/net/ipv6/conf/all/forwarding"
-        )
-    end
-
     context "when Firewall is enabled" do
       before(:each) do
         allow(Yast::SuSEFirewall).to receive(:IsEnabled) { true }
@@ -49,8 +34,6 @@
             .to receive(:SetSupportRoute)
             .with(forward_v4)
 
-          fw_independent_write_expects
-
           expect(Yast::Routing.WriteIPForwarding).to be_equal nil
         end
       end
@@ -71,8 +54,6 @@
             .to receive(:Write)
             .with(SYSCTL_IPV6_PATH, @value6)
 
-          fw_independent_write_expects
-
           expect(Yast::Routing.WriteIPForwarding).to be_equal nil
         end
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-network-3.1.123/testsuite/tests/Network_YaPI.out 
new/yast2-network-3.1.124/testsuite/tests/Network_YaPI.out
--- old/yast2-network-3.1.123/testsuite/tests/Network_YaPI.out  2015-07-31 
16:22:10.000000000 +0200
+++ new/yast2-network-3.1.124/testsuite/tests/Network_YaPI.out  2015-08-07 
10:07:12.000000000 +0200
@@ -295,10 +295,11 @@
 Execute        .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl 
--no-legend --no-pager --no-ask-password show SuSEfirewall2.service  
--property=Id  --property=MainPID  --property=Description  --property=LoadState 
 --property=ActiveState  --property=SubState  --property=UnitFileState  
--property=FragmentPath " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"]
 Execute        .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl 
--no-legend --no-pager --no-ask-password is-enabled SuSEfirewall2.service " 
$["exit":0, "stderr":"", "stdout":"laptop.suse.cz"]
 Write  .etc.sysctl_conf."net.ipv4.ip_forward" "0" true
+Write  .etc.sysctl_conf nil true
+Execute        .target.bash "sysctl -w net.ipv4.ip_forward=0" 0
 Write  .etc.sysctl_conf."net.ipv6.conf.all.forwarding" "0" true
 Write  .etc.sysctl_conf nil true
-Execute        .target.bash "echo 0 > /proc/sys/net/ipv4/ip_forward" 0
-Execute        .target.bash "echo 0 > /proc/sys/net/ipv6/conf/all/forwarding" 0
+Execute        .target.bash "sysctl -w net.ipv6.conf.all.forwarding=0" 0
 Read   .target.size "/etc/sysconfig/network/routes" 27
 Execute        .target.bash "/bin/cp /etc/sysconfig/network/routes 
/etc/sysconfig/network/routes.YaST2save" 0
 Execute        .target.remove "/etc/sysconfig/network/ifroute-eth0" 0


Reply via email to