Don't exit if machine has no ipv6 installed

We are trying to turn off `accept_ra`, so if we get an error that the
option doesn't exist we can just ignore it.
This commit is contained in:
Bryan Boreham committed 2020-06-04 16:12:38 +00:00
1 parent 9be65b466b
commit 7174738d9d
3 files changed
+11 -3

No files matched your search

+1 -1
View File
@@ -281,7 +281,7 @@ func EnsureBridge(procPath string, config *BridgeConfig, log *logrus.Logger, ips
}
}
// No ipv6 router advertisments please
if err := sysctl(procPath, "net/ipv6/conf/"+config.WeaveBridgeName+"/accept_ra", "0"); err != nil {
if err := sysctlIfExists(procPath, "net/ipv6/conf/"+config.WeaveBridgeName+"/accept_ra", "0"); err != nil {
return bridgeType, errors.Wrap(err, "setting accept_ra to 0")
}