Bug#845153: new ifconfig has incompatible output, please revert
tincho at tincho.org
Wed Nov 23 15:25:42 UTC 2016
tags 845153 + wontfix
severity 845153 wishlist
On 20/11/16 22:02, Marc MERLIN wrote:
> let's add ":" after the interface name, so that if you have eth0:0, you
> end up with eth0:0:
> let's remove "addr' after 'inet' so that it can break every single
> script that gets the ip address from ifconfig output.
> Well, never mind, that new ifconfig output is almost entirely different
> from the old one, the one that's been around for 20 years and that
> countless people rely on being that way.
I am sorry these changes have caused you problems. What happens is that
nettools has been unmaintained for a very long time, that's why nothing
has changed in all these years.
Now upstream is working again, fixing many issues and adding features.
As part of that, they have changed some of the tools' output.
> Sure, parsing ifconfig output is not great, but countless stuff on the
> internet does it. ipmasq, a package I've been using for 15 years to do
> custom firewalling heavily parses ifconfig output, and it's only one
> amongst many. Also, sorry, but I don't think there is an easy way to get
> the IP from an interface, or even your default GW in shell.
These days, I'd recommend parsing the one-line format from iproute2:
# ip -o addr list
But this can change too, and has changed in the past. I had already to
fix code that broke because of those changes.
> Obviously this came from upstream, please forward this complaint to them
> and/or ensure that this new (IMO broken) ifconfig does not spread
> further in debian.
> If someone feels the need to change ifconfig output that much, they can
> call it ifconfig2, or ip2.
I understand you are frustrated. But I don't want to patch this in
Debian, nor I want to try to convince upstream to revert the output
format, as the old one had many problems. You are free to discuss this
issue with them, though.
Martín Ferrari (Tincho)
More information about the Pkg-net-tools-maintainers