linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/ipv4: add comment about connect() to INADDR_ANY
@ 2020-07-25 17:22 Konstantin Khlebnikov
  2020-07-30 23:29 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Khlebnikov @ 2020-07-25 17:22 UTC (permalink / raw)
  To: netdev, David S. Miller; +Cc: linux-kernel

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)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/ipv4: add comment about connect() to INADDR_ANY
  2020-07-25 17:22 [PATCH] net/ipv4: add comment about connect() to INADDR_ANY Konstantin Khlebnikov
@ 2020-07-30 23:29 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-30 23:29 UTC (permalink / raw)
  To: koct9i; +Cc: netdev, linux-kernel

From: Konstantin Khlebnikov <koct9i@gmail.com>
Date: Sat, 25 Jul 2020 20:22:50 +0300

> Copy comment from net/ipv6/tcp_ipv6.c to help future readers.
> 
> Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>

This function is used by many lookups, not just connect() so the
comment is entirely inapropriate here.

I'm not applying this, sorry.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-30 23:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25 17:22 [PATCH] net/ipv4: add comment about connect() to INADDR_ANY Konstantin Khlebnikov
2020-07-30 23:29 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).