Fix route address set polluted by appended default element
This commit is contained in:
parent
8caaa93f8d
commit
b1c48c12e2
1 changed files with 1 additions and 1 deletions
|
|
@ -161,7 +161,7 @@ func nftablesCreateIPSet(
|
||||||
IntervalEnd: true,
|
IntervalEnd: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if len(prefixList) == 0 && appendDefault {
|
if appendDefault && len(setElements) == 0 {
|
||||||
if family == nftables.TableFamilyIPv4 {
|
if family == nftables.TableFamilyIPv4 {
|
||||||
setElements = append(setElements, nftables.SetElement{
|
setElements = append(setElements, nftables.SetElement{
|
||||||
Key: netip.IPv4Unspecified().AsSlice(),
|
Key: netip.IPv4Unspecified().AsSlice(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue