Skip to content

Commit 0da5c38

Browse files
authored
Merge pull request #1554 from gravitl/bugfix_v0.15.2_nft_rules
remove unnecessary nft rule
2 parents 9016252 + f47d89e commit 0da5c38

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

logic/gateway.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"encoding/json"
55
"errors"
66
"fmt"
7-
"net"
87
"strings"
98
"time"
109

@@ -334,12 +333,6 @@ func firewallNFTCommandsCreateEgress(networkInterface string, gatewayInterface s
334333
postUp += "nft add table nat ; "
335334
postUp += "nft 'add chain ip nat prerouting { type nat hook prerouting priority 0 ;}' ; "
336335
postUp += "nft 'add chain ip nat postrouting { type nat hook postrouting priority 0 ;}' ; "
337-
for _, networkCIDR := range gatewayranges {
338-
if net.ParseIP(networkCIDR).To16() != nil {
339-
continue
340-
}
341-
postUp += "nft add rule nat postrouting iifname " + networkInterface + " oifname " + gatewayInterface + " ip saddr " + networkCIDR + " masquerade ; "
342-
}
343336

344337
postDown += "nft flush table filter ; "
345338

0 commit comments

Comments
 (0)