Live data from Hacker News

Enabling IPv6 support for IPv4-only apps on Linux

blog.apnic.net

61–70 of 199 posts

Re: Enabling IPv6 support for IPv4-only apps on Linux

#61

Why is this not just default behaviour? If I don't have IPv4 connectivity, yet a 6-to-4 gateway exists and I have IPv6 connectivity, and some app tries to use IPv4, then clearly the gateway should be used. How about some sysfs config option that says "redirect ipv4 to 6to4 gateway if no default ipv4 route exists", enabled by default.

> How about some sysfs config option that says "redirect ipv4 to 6to4 gateway if no default ipv4 route exists", enabled by default.

There are various 6to4 on-ramps that solve this. Popular ones are NAT64/DNS64, 464Xlat, and DS-Lite. In my experience, DS-Lite works nicely with v4-only apps/services or v6-only apps/services.

Re: Enabling IPv6 support for IPv4-only apps on Linux

#62

Earlier quoted context omitted.

Maintaining your own patchset for your personal use is usually not a good use of your time and expertise. Every time someone runs a linter over upstream, you're going to have to remake that patch. Sure, it's only 20 mins... But that multiplied by every bit of software you patch and every release, and you quickly realise that a huge chunk of your life was wasted doing what is effectively busywork. Instead, contribute…

You don't have to, its your own fork.

But you might want to integrate security patches... And one day you're going to need to make changes to support non-ancient glibc versions etc.

Even staying still in the world of software involves some level of effort.

Re: Enabling IPv6 support for IPv4-only apps on Linux

#63
post #9

"To prove that IPv6 is ready for production use, I built a second PC so I can access the IPv4 Internet"

An average user is not expected to do that. But I understand there are mobile operators out there who have been doing this (instead of NAT) for a while because they don't have IPv4 addresses for every consumer subscription? Wasn't T-Mobile US one of them? (Not living in the US.)

An average user shouldn't be able to find hardware not supporting IPv6, because it shouldn't be allowed to be sold. (And soon, hardware supporting IPv4.) Just like it happened with digital TV standards.

Re: Enabling IPv6 support for IPv4-only apps on Linux

#64

Why is this not just default behaviour? If I don't have IPv4 connectivity, yet a 6-to-4 gateway exists and I have IPv6 connectivity, and some app tries to use IPv4, then clearly the gateway should be used. How about some sysfs config option that says "redirect ipv4 to 6to4 gateway if no default ipv4 route exists", enabled by default.

This is probably something you can setup with netfilter, not a sysfs knob.

Re: Enabling IPv6 support for IPv4-only apps on Linux

#65
post #51

I made a Terrible decision of a project at Netflix. The idea was that you could swap out an IPv4 (AF_INET/SOCK_STREAM) socket with an AF_INET6 one. Turns out actually doing this with the Linux kernel is exceptionally difficult. You can swap out the underlying sk, but doing it safely is damn near impossible because the two data structures aren’t really built like that. One day, I’d love if someone added the ability to…

Tell us more about Netflix experimental projects like this.

Re: Enabling IPv6 support for IPv4-only apps on Linux

#66
post #48

I think retrofitting IPv4-only apps for IPv6 compatibility might be a short-term fix. It could be more forward-thinking to focus on developing new apps with inherent IPv6 support to prevent accruing technical debt and facing complications tied to maintaining outdated IPv4-only applications.

Please name and shame software/hardware that doesn't support IPv6 released after 2017 (when the IPv6 standard was finally finalized).

Re: Enabling IPv6 support for IPv4-only apps on Linux

#67
post #53

Would be interesting to know which applications actually have problems with v6 - the example with directly using a v4 IP is more a user error, not an application issue. I pretty much stopped submitting patches enabling v6 functionality to various projects back in 2005 as everything I cared about was working at that point. (Side note, I was just trying to search a few of those - but seems that period pretty much doesn…

The folding@home client, for example, is written in C with a "does everything" library (called cbang if I recall correctly). The library only uses sockets with AF_INET and thus it doesn't work even with AAAA records..

Re: Enabling IPv6 support for IPv4-only apps on Linux

#68
post #39

Why is this not just default behaviour? If I don't have IPv4 connectivity, yet a 6-to-4 gateway exists and I have IPv6 connectivity, and some app tries to use IPv4, then clearly the gateway should be used. How about some sysfs config option that says "redirect ipv4 to 6to4 gateway if no default ipv4 route exists", enabled by default.

Probably due to side effect.

Uh, I mean: side effects

It would probably have undesired effect... effects! Why does it autocorrect to effect??... in some cases.

Re: Enabling IPv6 support for IPv4-only apps on Linux

#69

Earlier quoted context omitted.

Also Android doesn't support DHCPv6

What's the benefit of DHCPv6 over SLAAC (genuine question, never looked into DHCPv6 at all)

> What's the benefit of DHCPv6 over SLAAC (genuine question, never looked into DHCPv6 at all)

In corporate-y environments it allows for easier tracking of user-MAC-IP mappings for auditing purposes. If you use SLAAC there is no auto-logging as the client simply picks an address itself.

One way to do tracking with SLAAC could be to SNMP scrape/trap ipNetToPhysicalTable of RFC 4293. Another would be 802.1X or MAC authentication (interim) accounting via RADIUS (RFC 2866).

Re: Enabling IPv6 support for IPv4-only apps on Linux

#70
post #42

And me living here and now with no ipv6 at all. (they say my or most ISP can enable ipv6 on reuest; country : Slovenia, year : 2023)

I moved to a new place ~600 meters away and had to go from having IPv6 over FTTH to IPv4 over copper. It's been over 6 months but I still can't get over it.
Post reply on HN