Merge pull request #589 from mars1024/feat/sysctl
portmap: use slashes in sysctl template to support interface names which separated by dots
This commit is contained in:
commit
1c1799ef39
@ -337,7 +337,7 @@ func genMarkMasqChain(markBit int) chain {
|
|||||||
// enableLocalnetRouting tells the kernel not to treat 127/8 as a martian,
|
// enableLocalnetRouting tells the kernel not to treat 127/8 as a martian,
|
||||||
// so that connections with a source ip of 127/8 can cross a routing boundary.
|
// so that connections with a source ip of 127/8 can cross a routing boundary.
|
||||||
func enableLocalnetRouting(ifName string) error {
|
func enableLocalnetRouting(ifName string) error {
|
||||||
routeLocalnetPath := "net.ipv4.conf." + ifName + ".route_localnet"
|
routeLocalnetPath := "net/ipv4/conf/" + ifName + "/route_localnet"
|
||||||
_, err := sysctl.Sysctl(routeLocalnetPath, "1")
|
_, err := sysctl.Sysctl(routeLocalnetPath, "1")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user