cloudnativelabs / kube-router

Kube-router, a turnkey solution for Kubernetes networking.
https://kube-router.io
Apache License 2.0
2.33k stars 471 forks source link

fix: wrong ipset name used by ip6tables. #1654

Closed xujunjie-cover closed 7 months ago

xujunjie-cover commented 7 months ago

ipset name has prefix "inet6:" for ipv6. so ip6tables rule also need to convert ipset name.

Issue: #1653

aauren commented 7 months ago

@xujunjie-cover Thanks for digging into this and being willing to contribute a fix.

When I tested it in my environment, I found that there was still a small problem where it was trying to delete the valid inet6 prefixed ipsets on cleanup.

It looks like this is because the ipset needed to be prefixed correctly when it was generated. I also added some unit tests to this to hopefully prevent regression.