Skip to content

Commit

Permalink
Merge pull request #705 from devbv/master
Browse files Browse the repository at this point in the history
portmap: fix bug that new udp connection deletes all existing conntrack entries
  • Loading branch information
squeed committed Feb 23, 2022
2 parents 9f67faf + dca23ad commit 26745d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/utils/conntrack.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ func DeleteConntrackEntriesForDstIP(dstIP string, protocol uint8) error {
// by the given destination port, protocol and IP family
func DeleteConntrackEntriesForDstPort(port uint16, protocol uint8, family netlink.InetFamily) error {
filter := &netlink.ConntrackFilter{}
filter.AddPort(netlink.ConntrackOrigDstPort, port)
filter.AddProtocol(protocol)
filter.AddPort(netlink.ConntrackOrigDstPort, port)

_, err := netlink.ConntrackDeleteFilter(netlink.ConntrackTable, family, filter)
if err != nil {
Expand Down

0 comments on commit 26745d3

Please sign in to comment.