7 min read
|
Saved February 14, 2026
|
Copied!
Do you care about this?
This article explores Cloudflare's attempts to enhance the Linux networking stack, particularly through their soft-unicast method for sharing IP addresses. It details the technical hurdles faced with socket binding and NAT, and how the team developed innovative solutions like using TCP Fast Open to streamline connection management.
If you do, here's more
The article dives into the complexities of the Linux networking stack, particularly focusing on Cloudflare's soft-unicast technology. Soft-unicast allows the sharing of IP addresses across machines, which is beneficial for various Cloudflare products. However, implementing it involves navigating the intricacies of IP packet forwarding and the limitations of tools like iptables and Netfilter. The author explains how they encountered challenges when different processes tried to bind TCP sockets using the same address range, leading to connection conflicts and unexpected errors.
To address these issues, the team created a dedicated service named SLATFATF, or "fish," to manage IP packets specifically for soft-unicast. Their initial approach of using distinct per-client addresses still ran into problems with conntrack, which tracks active connections and can rewrite packets in ways that disrupt intended behavior. For instance, if two processes attempted to use the same address, conntrack might alter the source port without the processes realizing it, causing connection failures.
The solution for WARP involved stopping the rewriting of IP packets altogether. Instead, they chose to terminate TCP connections on the server and proxy them to a locally created socket with the correct soft-unicast address. While this method added resource overhead and potential latency, it was a straightforward fix. The author also explored using the Netlink interface to manage conntrack entries before socket creation. This approach could help prevent connection issues but comes with efficiency drawbacks, as interacting with Netlink is slower than the typical socket operations. The article emphasizes the need for a more efficient way to handle these connection tracking challenges while leveraging the benefits of soft-unicast technology.
Questions about this article
No questions yet.