From: Ben Greear <greearb@candelatech.com>
To: kuznet@ms2.inr.ac.ru
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH] Networking: send-to-self [link to non-broken patch this
Date: Thu, 26 Sep 2002 18:30:51 -0700 [thread overview]
Message-ID: <3D93B4CB.8040905@candelatech.com> (raw)
In-Reply-To: 200209270100.FAA19447@sex.inr.ac.ru
kuznet@ms2.inr.ac.ru wrote:
> Hello!
>
>
>>The old way is broken, it sets the bound-device to 0 when sending
>>the syn-ack.
>
>
> Ben, this function is _not_ used to send syn-acks...
I am not so sure, untill I changed that method, it most certainly
did not work. It could have been something other than the syn-ack
that failed though...
Unfortunately, I ripped out all of the printks, so I cannot easily back
up my claims w/out poluting the code again.
>
>
>
>>+#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
>
>
> This chunk is noop, sk here is a dummy socket internal to kernel,
> where sk->bound_dev_if is identical zero. Grep code to see
> what it is used for.
Think about this: Suppose you are connecting to a listening socket that has been
bound to a device. That creates the the temporary socket structure
on the receive side, which
is used to send the syn-ack. That temp socket structure must also be
bound to the same device, or the ack will not get routed correctly
back out of the right interface.
As far as I can tell, the code must be patched as above or the temp socket
will not use the correct bound device. Please explain how the syn-ack
can get routed based on the parent's bound_dev_if if my assumption here is
not correct.
>
> The same ("noopness") is true about 90% of the patch. F.e. all the messing
> inside tcp with openreqs is noop.
>
> Essentially, the only chunk which has a real meaning is that one
> for fib_frontend.c. And it is simpler to do this with sysctl, compare
> to rp_filter at al.
I will investigate that code...I haven't used sysctl on purpose before :)
Thanks for the review, and I look forward to your response to my
assertions!
Ben
>
> Alexey
>
--
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
next prev parent reply other threads:[~2002-09-27 1:30 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
2002-09-27 1:00 ` [PATCH] Networking: send-to-self [link to non-broken patch this kuznet
2002-09-27 1:30 ` Ben Greear [this message]
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=3D93B4CB.8040905@candelatech.com \
--to=greearb@candelatech.com \
--cc=kuznet@ms2.inr.ac.ru \
--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).