libnetwork/drivers/bridge: minor formatting fixes
My IDE kept on re-formatting, so let's do so. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
a9e8110fe3
commit
014fefee1d
1 changed files with 20 additions and 8 deletions
|
@ -401,16 +401,28 @@ func setupInternalNetworkRules(bridgeIface string, addr *net.IPNet, icc, insert
|
|||
|
||||
if addr.IP.To4() != nil {
|
||||
version = iptables.IPv4
|
||||
inDropRule = iptRule{table: iptables.Filter, chain: IsolationChain1, args: []string{
|
||||
"-i", bridgeIface, "!", "-d", addr.String(), "-j", "DROP"}}
|
||||
outDropRule = iptRule{table: iptables.Filter, chain: IsolationChain1, args: []string{
|
||||
"-o", bridgeIface, "!", "-s", addr.String(), "-j", "DROP"}}
|
||||
inDropRule = iptRule{
|
||||
table: iptables.Filter,
|
||||
chain: IsolationChain1,
|
||||
args: []string{"-i", bridgeIface, "!", "-d", addr.String(), "-j", "DROP"},
|
||||
}
|
||||
outDropRule = iptRule{
|
||||
table: iptables.Filter,
|
||||
chain: IsolationChain1,
|
||||
args: []string{"-o", bridgeIface, "!", "-s", addr.String(), "-j", "DROP"},
|
||||
}
|
||||
} else {
|
||||
version = iptables.IPv6
|
||||
inDropRule = iptRule{table: iptables.Filter, chain: IsolationChain1, args: []string{
|
||||
"-i", bridgeIface, "!", "-o", bridgeIface, "!", "-d", addr.String(), "-j", "DROP"}}
|
||||
outDropRule = iptRule{table: iptables.Filter, chain: IsolationChain1, args: []string{
|
||||
"!", "-i", bridgeIface, "-o", bridgeIface, "!", "-s", addr.String(), "-j", "DROP"}}
|
||||
inDropRule = iptRule{
|
||||
table: iptables.Filter,
|
||||
chain: IsolationChain1,
|
||||
args: []string{"-i", bridgeIface, "!", "-o", bridgeIface, "!", "-d", addr.String(), "-j", "DROP"},
|
||||
}
|
||||
outDropRule = iptRule{
|
||||
table: iptables.Filter,
|
||||
chain: IsolationChain1,
|
||||
args: []string{"!", "-i", bridgeIface, "-o", bridgeIface, "!", "-s", addr.String(), "-j", "DROP"},
|
||||
}
|
||||
}
|
||||
|
||||
if err := programChainRule(version, inDropRule, "DROP INCOMING", insert); err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue