Skip to content

Commit b1c48c1

Browse files
committed
Fix route address set polluted by appended default element
1 parent 8caaa93 commit b1c48c1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

redirect_nftables_exprs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func nftablesCreateIPSet(
161161
IntervalEnd: true,
162162
})
163163
}
164-
if len(prefixList) == 0 && appendDefault {
164+
if appendDefault && len(setElements) == 0 {
165165
if family == nftables.TableFamilyIPv4 {
166166
setElements = append(setElements, nftables.SetElement{
167167
Key: netip.IPv4Unspecified().AsSlice(),

0 commit comments

Comments
 (0)