netlabel/netlabel_tools

BUG: netlabel-config doesn't handle IPv6 address properly

Closed this issue · 4 comments

local addr=$(echo $i | cut -d',' -f 2 | cut -d':' -f 2)

The last cut -d':' -f 2 will break any IPv6 address found in the running configuration. Indeed, it will only return the very first part of the IPv6 address before the very first : in the address. And thus the netlabel-config reset command will not be able to purge IPv6 based rules for the unlbl protocol.

I suggest using cut -d':' -f 2- instead.

That's a nice catch @hubertqc, thank you!

Any chance you would be interested in submitting a PR to fix the problem? If so, there are some basic guidelines in the CONTRIBUTING.md file, but I'm also happy to answer any questions you may have about the process.

Hi @pcmoore,

Thanks to you, I just submitted my very first PR on a public GitHub repo !

Hope I did it correctly.

Thanks @hubertqc, I appreciate the help!

This should be resolved with PR #11.