Skip to content
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

Fix multiple ipv4 addrs bug #53

Merged

Conversation

frenzymadness
Copy link
Member

pifconfig is unable to show multiple IPv4 addresses attached to one interface - this is basically the same behavior as ifconfig command has but there is an old patch in RHEL which allows it so it might be a good idea to backport it here and provide the same functionality in all versions.

Example output in RHEL 7:

dummy0 HWaddr 66:78:8f:23:38:94
          inet addr:10.20.30.40 Bcast:10.20.30.255   Mask:255.255.255.255
          inet addr:10.20.30.45 Bcast:10.20.30.255   Mask:255.255.255.255
          inet addr:10.20.30.50 Bcast:10.20.30.255   Mask:255.255.255.255
	  inet6 addr: fe80::6478:8fff:fe23:3894/64 Scope: link
	  UP BROADCAST RUNNING NOARP

Example output with the newest ethtool:

dummy0
	HWaddr 6a:83:e2:25:65:69
	inet addr:10.20.30.40
	Bcast:10.20.30.255
	Mask:255.255.255.255
	inet6 addr: fe80::6883:e2ff:fe25:6569/64 Scope: link
	UP BROADCAST RUNNING NOARP

Output with merged patch:

dummy0
	HWaddr 22:ea:1d:9b:c9:e2
	inet addr:10.20.30.40 Bcast:10.20.30.255 Mask:255.255.255.255
	inet addr:10.20.30.45 Bcast:10.20.30.255 Mask:255.255.255.255
	inet addr:10.20.30.50 Bcast:10.20.30.255 Mask:255.255.255.255
	inet6 addr: fe80::20ea:1dff:fe9b:c9e2/64 Scope: link
	UP BROADCAST RUNNING NOARP

I'd say that the last one is the most readable because every IPv4/IPv6 record is on one line.

If you disagree, I'll have to maintain this patch in the new versions of RHEL to keep desired functionality.

@frenzymadness frenzymadness merged commit 8dd5f63 into fedora-python:master Dec 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants