netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: "David S. Miller" <davem@redhat.com>
Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Networking: send-to-self [link to non-broken patch this time]
Date: Wed, 18 Sep 2002 20:04:44 -0700	[thread overview]
Message-ID: <3D893ECC.4020906@candelatech.com> (raw)
In-Reply-To: 20020918.190117.53168129.davem@redhat.com

David S. Miller wrote:
>    From: Ben Greear <greearb@candelatech.com>
>    Date: Wed, 18 Sep 2002 19:07:33 -0700
> 
>    David S. Miller wrote:
>    
>    > I mean put the ifdefs in a header file such as tcp.h, not in the *.c
>    > code.
>    
>    Would you object to me just removing all of them and having the patch
>    unconditionally compiled in?
> 
> Your comments say that SIOCBINDTODEVICE behavior is changed, how can
> we legitimately do that all the time without breaking apps?

The old way is broken, it sets the bound-device to 0 when sending
the syn-ack.  I am not sure exactly how this worked before, or
if it even worked at all.  I changed it to use the bound_dev_if of the
parent socket, which I believe is more correct.

--- linux-2.4.19/net/ipv4/ip_output.c	Tue Sep 17 23:55:48 2002
+++ linux-2.4.19.dev/net/ipv4/ip_output.c	Sun Sep 15 21:19:45 2002
@@ -975,7 +975,11 @@
  			daddr = replyopts.opt.faddr;
  	}

+#ifdef CONFIG_NET_SENDTOSELF
+	if (ip_route_output(&rt, daddr, rt->rt_spec_dst, RT_TOS(skb->nh.iph->tos), sk->bound_dev_if))
+#else
  	if (ip_route_output(&rt, daddr, rt->rt_spec_dst, RT_TOS(skb->nh.iph->tos), 0))
+#endif
  		return;

  	/* And let IP do all the hard work.


It also failed due to the hashing issue, but with the current code,
packets to self from self will be dropped before reaching the IP
code, so that is not really a bug in the current code.

Ben

-- 
Ben Greear <greearb@candelatech.com>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear

  reply	other threads:[~2002-09-19  3:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-18  6:47 [PATCH] Networking: send-to-self Ben Greear
2002-09-18  6:44 ` David S. Miller
2002-09-18  6:53 ` Ben Greear
2002-09-18  7:09 ` [PATCH] Networking: send-to-self [link to non-broken patch this time] Ben Greear
2002-09-18 22:55   ` David S. Miller
2002-09-18 23:20     ` Ben Greear
2002-09-19  1:28       ` David S. Miller
2002-09-19  2:07         ` Ben Greear
2002-09-19  2:01           ` David S. Miller
2002-09-19  3:04             ` Ben Greear [this message]
2002-09-27  1:00               ` [PATCH] Networking: send-to-self [link to non-broken patch this kuznet
2002-09-27  1:30                 ` Ben Greear
2002-09-27  3:36                   ` kuznet
2002-09-27  6:33                 ` Ben Greear
2002-09-27 15:01                   ` kuznet
2002-09-27 15:40                     ` Ben Greear
2002-09-27 15:46                       ` kuznet
2002-09-27 15:53                         ` Ben Greear

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D893ECC.4020906@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).