From: Gilad Ben-Yossef <gilad@codefidence.com>
To: Valdis.Kletnieks@vt.edu
Cc: netdev@vger.kernel.org, ori@comsleep.com,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 1/1] Use defaults when no route options are available
Date: Tue, 3 Nov 2009 21:21:25 +0200 [thread overview]
Message-ID: <1257276085-13681-1-git-send-email-gilad@codefidence.com> (raw)
In-Reply-To: <4AF07024.80103@gmail.com>
Trying to parse the option of a SYN packet that we have
no route entry for should just use global wide defaults
for route entry options.
Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
---
include/net/dst.h | 2 +-
net/ipv4/tcp_input.c | 2 --
2 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/include/net/dst.h b/include/net/dst.h
index b562be3..0654c27 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -114,7 +114,7 @@ dst_metric(const struct dst_entry *dst, int metric)
static inline u32
dst_feature(const struct dst_entry *dst, u32 feature)
{
- return dst_metric(dst, RTAX_FEATURES) & feature;
+ return (dst ? dst_metric(dst, RTAX_FEATURES) & feature : 0);
}
static inline u32 dst_mtu(const struct dst_entry *dst)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 4262da5..57e99e1 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3704,8 +3704,6 @@ void tcp_parse_options(struct sk_buff *skb, struct tcp_options_received *opt_rx,
struct tcphdr *th = tcp_hdr(skb);
int length = (th->doff * 4) - sizeof(struct tcphdr);
- BUG_ON(!estab && !dst);
-
ptr = (unsigned char *)(th + 1);
opt_rx->saw_tstamp = 0;
--
1.5.6.3
next prev parent reply other threads:[~2009-11-03 19:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-03 17:50 2.6.32-rc5-mmotm1101 - kernel BUG at net/ipv4/tcp_input.c:3707! Valdis.Kletnieks
2009-11-03 18:02 ` Eric Dumazet
2009-11-03 19:20 ` Gilad Ben-Yossef
2009-11-03 21:34 ` Ilpo JÀrvinen
2009-11-04 2:01 ` Valdis.Kletnieks
2009-11-04 2:34 ` David Miller
2009-11-04 6:38 ` Gilad Ben-Yossef
2009-11-04 16:40 ` [PATCH testing] Do not call IPv4 specific func in tcp_check_req Gilad Ben-Yossef
2009-11-05 7:22 ` David Miller
2009-11-04 16:43 ` 2.6.32-rc5-mmotm1101 - kernel BUG at net/ipv4/tcp_input.c:3707! Gilad Ben-Yossef
2009-11-05 2:33 ` Valdis.Kletnieks
2009-11-05 7:25 ` David Miller
2009-11-05 7:22 ` David Miller
2009-11-04 6:27 ` Gilad Ben-Yossef
2009-11-03 19:21 ` Gilad Ben-Yossef [this message]
2009-11-04 13:28 ` [PATCH 1/1] Use defaults when no route options are available David Miller
2009-11-04 14:27 ` Gilad Ben-Yossef
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=1257276085-13681-1-git-send-email-gilad@codefidence.com \
--to=gilad@codefidence.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ori@comsleep.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
all inboxes | Powered by JetHome®