From: Ben Greear <greearb@candelatech.com>
To: NetDev <netdev@vger.kernel.org>, Patrick McHardy <kaber@trash.net>
Subject: Missing device binding relating to tcp_v4_send_reset?
Date: Mon, 09 Aug 2010 10:46:26 -0700 [thread overview]
Message-ID: <4C603EF2.9010902@candelatech.com> (raw)
This snippet is from some patches Patrick did for me some time
back. I think the rest of his work has been merged upstream, but
this patch was not. I'm honestly not sure if it's needed or not,
but we've been running with it for at least a year or so and it's
been working fine for us.
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 0207662..1af47db 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -641,6 +641,7 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
arg.iov[0].iov_len, IPPROTO_TCP, 0);
arg.csumoffset = offsetof(struct tcphdr, check) / 2;
arg.flags = (sk && inet_sk(sk)->transparent) ? IP_REPLY_ARG_NOSRCCHECK : 0;
+ arg.bound_dev_if = skb_rtable(skb)->fl.iif;
net = dev_net(skb_dst(skb)->dev);
ip_send_reply(net->ipv4.tcp_sock, skb,
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next reply other threads:[~2010-08-09 17:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 17:46 Ben Greear [this message]
2010-08-10 8:48 ` Missing device binding relating to tcp_v4_send_reset? David Miller
2010-08-10 14:22 ` 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=4C603EF2.9010902@candelatech.com \
--to=greearb@candelatech.com \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
/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).