Reworked update code, split v4/v6 updates
- collect dns updatees individually, so that we clear A and AAAA separately if and only if needed. - made nft AddIP call more resilient against partial updates - updated nft processing code to no longer add nil to a v4/v6 set which would end in an invalid call to AddIP when updating nft. call it individually now. - updated samples with real world traces from an AVM Box
This commit is contained in:
@ -65,6 +65,9 @@ func (nut *NFTUpdateTable) FindOrAddSet(SetName string, IP6 bool) (*NFTUpdateSet
|
||||
}
|
||||
|
||||
func (nu *NFTUpdate) AddIP(TableName string, SetName string, IP net.IP) error {
|
||||
if IP == nil {
|
||||
return nil
|
||||
}
|
||||
ip6 := (IP.To4() == nil)
|
||||
nut := nu.FindOrAddTable(TableName)
|
||||
nus, err := nut.FindOrAddSet(SetName, ip6)
|
||||
|
Reference in New Issue
Block a user