Move AWSVPC sysctls into Go code
This commit is contained in:
1 parent
ab380ed2c1
commit
c8e0c12d34
2 files changed
+12
-8
No files matched your search
@@ -228,6 +228,18 @@ func CreateBridge(config *BridgeConfig) (BridgeType, error) {
|
||||
|
||||
if config.IsAWSVPC {
|
||||
bridgeType = AWSVPC
|
||||
// Set proxy_arp on the bridge, so that it could accept packets destined
|
||||
// to containers within the same subnet but running on remote hosts.
|
||||
// Without it, exact routes on each container are required.
|
||||
if err := sysctl("net/ipv4/conf/"+config.WeaveBridgeName+"/proxy_arp", "1"); err != nil {
|
||||
return bridgeType, errors.Wrap(err, "setting proxy_arp")
|
||||
}
|
||||
// Avoid delaying the first ARP request. Also, setting it to 0 avoids
|
||||
// placing the request into a bounded queue as it can be seen:
|
||||
// https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/net/ipv4/arp.c?id=refs/tags/v4.6.1#n819
|
||||
if err := sysctl("net/ipv4/neigh/"+config.WeaveBridgeName+"/proxy_delay", "0"); err != nil {
|
||||
return bridgeType, errors.Wrap(err, "setting proxy_arp")
|
||||
}
|
||||
}
|
||||
|
||||
if bridgeType == Bridge {
|
||||
|
||||
Reference in new issue
Block a user