Live data from Hacker News

Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

blog.farhan.codes

21–30 of 141 posts

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#21
post #5

I don't buy it. Yes, Linux never breaks userland. Yes, ifconfig is deprecated. But I still don't see how these are related.

I still don't understand how this "Linux never breaks userland" thing holds up, it's been proven false. The 4.13 kernel introduced a change to effectively namespace sysctl settings (prevent the change from default from being copied to the host system into container processes). This broke any container runtimes that relied on host-wide sysctl settings. [1] https://github.com/aws/amazon-ecs-agent/issues/789 [2] https:/…

I think the real guarantee is more like "linux doesn't break the syscall API" (the API, not the ABI). I think sysctl is not really part of it.

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#22
post #6

Here's an example from a decade ago (ifconfig was deprecated then too): - bonded interfaces - with vlans - with multiple IPs If this sounds unrealistic, it was the standard config for index arbitrage at an investment bank. The interfaces, added with distro scripts, will use `ip` and all the interfaces will show up in `ip addr` and work perfectly. ifconfig won't show about half of them - they won't be up, or down, the…

I set up systems in 2009+ that had multiple IPs per phy, bonded, vlan, etc. on linux. I used the config files within the distro (mostly CentOS/RH then) to do this. Worked fine. I developed somewhat better inspection scripting to augment this. My users never had problems with this.

I think the distro tooling used ip under the covers. I didn't care one way or the other. Nor did the users.

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#23
This is highly biased opinion piece. I like BSD. I liked pre-Oracle Solaris. And I like Linux at lot too.

And it is factually inaccurate. Deprecation of ifconfig is a distro issue. "Linux" did not deprecate it. And the reason is that it was unmaintained, not that it couldn't handle multiple IP addresses. In fact it can, I still use it 50% of the time. Works fine for setting and displaying multiple addresses.

The Debian maintainers wanted to drop it, and the other distros all followed suit a couple years later. Good information and links here:

https://serverfault.com/questions/633087/where-is-the-statem...

"Linux maintains known bugs – and actively refuses to fix them. In fact, if you attempt to fix them, Linus will curse at you, as manifest by this email."

That is a bold statement but is not at all supported by the linked email. You'll see Linus cursing at a bad patch that would break something in userland, not for "maintaining a bug". He's preventing at least two bugs (unnecessary change to behavior and ENOENT is indeed the wrong return value). I think I liked the old Linus better...

So it's a shame. I'd love to read a series about BSD, but this is really just inaccurate propaganda.

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#24
post #14
post #6

Here's an example from a decade ago (ifconfig was deprecated then too): - bonded interfaces - with vlans - with multiple IPs If this sounds unrealistic, it was the standard config for index arbitrage at an investment bank. The interfaces, added with distro scripts, will use `ip` and all the interfaces will show up in `ip addr` and work perfectly. ifconfig won't show about half of them - they won't be up, or down, the…

I don’t doubt that you’ve had problems but e.g. ‘ifconfig bond0.143’ references an ethernet interface that represents vlan 143 on the bonded interface bond0. This sort of setup has worked for at least a decade on Linux for me, probably longer.

That's interesting. ifconfig bond0.143:0 would be the vlan? Either way I can definitely tell you the interfaces were missing from `ifconfig` but visible in `ip`.

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#25
post #23

This is highly biased opinion piece. I like BSD. I liked pre-Oracle Solaris. And I like Linux at lot too. And it is factually inaccurate. Deprecation of ifconfig is a distro issue. "Linux" did not deprecate it. And the reason is that it was unmaintained, not that it couldn't handle multiple IP addresses. In fact it can, I still use it 50% of the time. Works fine for setting and displaying multiple addresses. The Debi…

That's a great theory, but Linus picks and chooses when to decide it's outrageous to make changes that break userland tools based on his personal preferences. They intentionally broke ZFS - then Linus follows up with a wildly inaccurate statement about why he thinks nobody should use ZFS.

It's difficult to take him seriously when he picks and chooses when to enforce his supposed "never break userland" ethos.

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#27
post #7

There's no reason why someone can't get their act together and fix ifconfig, or if that is insurmountable, rewrite it while maintaining the same outward appearances. I think this is not specific to Linux at all, and is not really about kernel ABI. This is a problem I see a lot, often in proprietary software too. Firstly, people opt to rewrite before they fix or even before they fully understand the old thing. Secondl…

Software using obscure kernel interfaces does keep private copies of kernel data structures.

The reason is that people want the software to have full functionality no matter what system is used for building it. You can build on an old system, with a kernel that totally lacks the functionality, and produce a binary that can use the new kernel interfaces when run on a system that has them.

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#28
> On FreeBSD this is not a problem. They update the kernel and userland tools in tandem.

Yes it is a problem, to some programs doing, say, nice FFI to get at that ioctl and structure cleanly instead of forking and piping some utilities and text-processing their output.

The concept of an ABI, and one that is stable, is very real and important.

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#29
post #16

There's an assumption which this article makes which is not true; namely, that the only utilities which do (or should) use ioctl's are system programs like ipconfig which are shipped with the kernel. There are other programs, like for example Kerberos, who want to know what network addresses are used by the network, and requiring them to screen scrape ipconfig is not especially reasonable. So if you randomly change i…

(Is that you Ted?)

I kind of said the same thing just now:

https://news.ycombinator.com/item?id=22629837

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#30
post #27
post #7

There's no reason why someone can't get their act together and fix ifconfig, or if that is insurmountable, rewrite it while maintaining the same outward appearances. I think this is not specific to Linux at all, and is not really about kernel ABI. This is a problem I see a lot, often in proprietary software too. Firstly, people opt to rewrite before they fix or even before they fully understand the old thing. Secondl…

Software using obscure kernel interfaces does keep private copies of kernel data structures. The reason is that people want the software to have full functionality no matter what system is used for building it. You can build on an old system, with a kernel that totally lacks the functionality, and produce a binary that can use the new kernel interfaces when run on a system that has them.

Glibc certainly does this, I would expect for limited periods per interface. It is often at the cutting edge of kernel interfaces, so that becomes necessary during interim periods. I really doubt it makes sense for old and stable things like ifconfig, or a tipical application.
Post reply on HN