79b3a063e4
- Fail to start network instead of losing routes if IPv6 forwarding is required. bsc#1025252 Added patches: 00d28a78b-check-accept_ra-before-enabling-ipv6-forward.patch 3ee35d7d6-more-uses-of-SYSCTL_PATH.patch 5dd607059-add-virNetDevGetName.patch 754515b7d-add-virNetlinkDumpCommand.patch d68cb4f55-extract-the-request-sending-code-from-virNetlin.patch OBS-URL: https://build.opensuse.org/request/show/481947 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=593
47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
From 3ee35d7d6caf0ffa722d60251eabec43c094fb12 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com>
|
|
Date: Fri, 3 Mar 2017 14:13:49 +0100
|
|
Subject: [PATCH 3/5] bridge_driver.c: more uses of SYSCTL_PATH
|
|
|
|
Replace a few occurences of /proc/sys by the corresponding macro
|
|
defined a few lines after: SYSCTL_PATH
|
|
---
|
|
src/network/bridge_driver.c | 9 +++++----
|
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
|
|
index 32c5ab7a7..4d1a44516 100644
|
|
--- a/src/network/bridge_driver.c
|
|
+++ b/src/network/bridge_driver.c
|
|
@@ -85,6 +85,8 @@
|
|
*/
|
|
#define VIR_NETWORK_DHCP_LEASE_FILE_SIZE_MAX (32 * 1024 * 1024)
|
|
|
|
+#define SYSCTL_PATH "/proc/sys"
|
|
+
|
|
VIR_LOG_INIT("network.bridge_driver");
|
|
|
|
static virNetworkDriverStatePtr network_driver;
|
|
@@ -2092,15 +2094,14 @@ networkEnableIPForwarding(bool enableIPv4, bool enableIPv6)
|
|
&enabled, sizeof(enabled));
|
|
#else
|
|
if (enableIPv4)
|
|
- ret = virFileWriteStr("/proc/sys/net/ipv4/ip_forward", "1\n", 0);
|
|
+ ret = virFileWriteStr(SYSCTL_PATH "/net/ipv4/ip_forward", "1\n", 0);
|
|
if (enableIPv6 && ret == 0)
|
|
- ret = virFileWriteStr("/proc/sys/net/ipv6/conf/all/forwarding", "1\n", 0);
|
|
+ ret = virFileWriteStr(SYSCTL_PATH "/net/ipv6/conf/all/forwarding", "1\n", 0);
|
|
+
|
|
#endif
|
|
return ret;
|
|
}
|
|
|
|
-#define SYSCTL_PATH "/proc/sys"
|
|
-
|
|
static int
|
|
networkSetIPv6Sysctls(virNetworkObjPtr network)
|
|
{
|
|
--
|
|
2.12.0
|
|
|