New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ifconfig parser fail to list multi line for inet6 addr #314
Comments
Hi there! Thanks for reporting this. Could you copy/paste the
There are no plans to create an |
Here it is.
Obviously I didn't know it, I should really look the man more often, That's cool. Thank you. |
Yep, was able to reproduce an issue here. I was expecting only the first IPv6 address to be parsed but got |
I'm using a third-party library to parse
The test files that I'm using are based on CentOS7, where the IPv6 line looks like this:
But your IPv6 line looks a little different (Ubuntu 22.04?)
The regex seems completely wrong so maybe it was built for older versions of linux and newer versions use more of a bsd-style, which is handled by some other regex's in the parser. Doesn't seem like it will be difficult to fix. Note that the |
Oh, no, same format, but github hide the " |
Oh, gotcha! Ok, so here's what's happening:
Looks like this is working as designed and is a limitation of the |
Maybe for now I'll add this to the |
I can go with |
I've added the limitations and recommendation to use |
Looks like I should be able to do a quick rewrite and add in multiple IPv4 and IPv6 IP address info per interface. This way I can also add more functionality to the parser and not need to rely on the 3rd party library. |
That's a very good news! |
I think I have this working - just need to do a lot more testing to make sure I don't break backwards compatibility. Basically I'm keeping the old IP fields for backwards compatibility but adding
Just noticed I can clean up the field names within |
Looks good to me, thanks a lot. |
I have a working version in the You can copy the file above and put it in your plugin directory:
Let me know if you run into any issues! (note this version will only run with |
Hi, tried.
\o/ |
Nice! |
Released in |
Hi there,
am I missing something obvious ?
$ ifconfig wlp1s0 | grep -c inet6
4
$ jc -p ifconfig wlp1s0 | grep -c ipv6_addr
1
$
Also didn't find an "ip" command parser yet.
jc version 1.17.3 on Ubuntu 22.04
The text was updated successfully, but these errors were encountered: