add --physdev-is-bridged flag when using physdev module for iptables
rules created by weave-npc to prevent warning in kernel logs Fixes #3449
This commit is contained in:
1 parent
6e3f8a1c7a
commit
06669325a7
1 file changed
+2
-2
@@ -128,7 +128,7 @@ func createBaseRules(ipt *iptables.IPTables, ips ipset.Interface) error {
|
|||||||
|
|
||||||
// If the destination address is not any of the local pods, let it through
|
// If the destination address is not any of the local pods, let it through
|
||||||
if err := ipt.Append(npc.TableFilter, npc.MainChain,
|
if err := ipt.Append(npc.TableFilter, npc.MainChain,
|
||||||
"-m", "physdev", "--physdev-out="+bridgePortName, "-j", "ACCEPT"); err != nil {
|
"-m", "physdev", "--physdev-is-bridged", "--physdev-out="+bridgePortName, "-j", "ACCEPT"); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ func createBaseRules(ipt *iptables.IPTables, ips ipset.Interface) error {
|
|||||||
|
|
||||||
ruleSpecs := [][]string{
|
ruleSpecs := [][]string{
|
||||||
{"-m", "state", "--state", "RELATED,ESTABLISHED", "-j", "ACCEPT"},
|
{"-m", "state", "--state", "RELATED,ESTABLISHED", "-j", "ACCEPT"},
|
||||||
{"-m", "physdev", "--physdev-in=" + bridgePortName, "-j", "RETURN"},
|
{"-m", "physdev", "--physdev-is-bridged", "--physdev-in=" + bridgePortName, "-j", "RETURN"},
|
||||||
}
|
}
|
||||||
if allowMcast {
|
if allowMcast {
|
||||||
ruleSpecs = append(ruleSpecs, []string{"-d", "224.0.0.0/4", "-j", "RETURN"})
|
ruleSpecs = append(ruleSpecs, []string{"-d", "224.0.0.0/4", "-j", "RETURN"})
|
||||||
|
|||||||
Reference in new issue
Block a user