lkml.org 
[lkml]   [2020]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] net/ipv4: add comment about connect() to INADDR_ANY
From
Date
Copy comment from net/ipv6/tcp_ipv6.c to help future readers.

Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
---
net/ipv4/route.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index a01efa062f6b..303fe706cbd2 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2591,6 +2591,7 @@ struct rtable *ip_route_output_key_hash_rcu(struct net *net, struct flowi4 *fl4,
}
}

+ /* connect() to INADDR_ANY means loopback (BSD'ism). */
if (!fl4->daddr) {
fl4->daddr = fl4->saddr;
if (!fl4->daddr)
\
 
 \ /
  Last update: 2020-07-25 19:24    [W:0.039 / U:2.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site