ftao / python-ifcfg

Python cross-platform network interface discovery (ifconfig/ipconfig/ip)
BSD 3-Clause "New" or "Revised" License
55 stars 37 forks source link

inet is not populated when returning the ip address with an arrow notation (-->) #71

Closed aaronwarshay closed 1 year ago

aaronwarshay commented 1 year ago

Hi,

I have a case where the inet value was being returned ok in version 0.22, but fails to populate when using version 0.23:

utun3: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
    inet 10.11.11.72 --> 10.11.11.72 netmask 0xffffff00 

It occurs in macOS using an OpenVPN connection. Will you please investigate a fix for this case?

Regards,

-A

benjaoming commented 1 year ago

Hi @aaronwarshay

The error probably happened here: https://github.com/ftao/python-ifcfg/pull/67/files#diff-231f8ffbdb82aebe14681a88db72af3a09c3788200e3ab097e3de89d7a4561dbR245

If you can figure out a new regex that works, please go ahead and submit a PR :+1:

Ultimately, this repo needs some CI :)