mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #1273 from mrjana/lb
Match only locally destined requests for ingress
This commit is contained in:
commit
21c6bab508
1 changed files with 2 additions and 2 deletions
|
@ -436,8 +436,8 @@ func programIngress(gwIP net.IP, ingressPorts []*PortConfig, isDelete bool) erro
|
|||
}
|
||||
|
||||
for _, chain := range []string{"OUTPUT", "PREROUTING"} {
|
||||
if !iptables.Exists(iptables.Nat, chain, "-j", ingressChain) {
|
||||
if err := iptables.RawCombinedOutput("-t", "nat", "-I", chain, "-j", ingressChain); err != nil {
|
||||
if !iptables.Exists(iptables.Nat, chain, "-m", "addrtype", "--dst-type", "LOCAL", "-j", ingressChain) {
|
||||
if err := iptables.RawCombinedOutput("-t", "nat", "-I", chain, "-m", "addrtype", "--dst-type", "LOCAL", "-j", ingressChain); err != nil {
|
||||
return fmt.Errorf("failed to add jump rule in %s to ingress chain: %v", chain, err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue