nokia / danm-utils

BSD 3-Clause "New" or "Revised" License
6 stars 9 forks source link

Cleaner is deleting DanmEP without freeing its IPv6 IP #28

Closed eMGabriel closed 3 years ago

eMGabriel commented 3 years ago

Bad behaviour inspected after introducing pluginable IPAM handling in cleaner. The condition evaluating if an IP is allocated by a handler is broken due to evaluating only against the DanmNet's IPv4 CIDR. https://github.com/nokia/danm-utils/blob/4e817455012f0743af9f219bb841c4a22d033cb1/pkg/danmep/danm.go#L9-L11

Calico handler is also affected. Validating v6 IP against DanmNet's v6 CIDR is missing. https://github.com/nokia/danm-utils/blob/4e817455012f0743af9f219bb841c4a22d033cb1/pkg/danmep/calico.go#L14-L18