From: Eric Dumazet <eric.dumazet@gmail.com>
To: Chris Boot <bootc@bootc.net>, David Miller <davem@davemloft.net>
Cc: lkml <linux-kernel@vger.kernel.org>,
netdev <netdev@vger.kernel.org>,
Steffen Klassert <steffen.klassert@secunet.com>
Subject: [PATCH] bridge: provide a mtu() method for fake_dst_ops
Date: Thu, 22 Dec 2011 07:00:32 +0100 [thread overview]
Message-ID: <1324533632.2621.35.camel@edumazet-laptop> (raw)
In-Reply-To: <1324528656.2621.19.camel@edumazet-laptop>
Commit 618f9bc74a039da76 (net: Move mtu handling down to the protocol
depended handlers) forgot the bridge netfilter case, adding a NULL
dereference in ip_fragment().
Reported-by: Chris Boot <bootc@bootc.net>
CC: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/bridge/br_netfilter.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index d6ec372..08757dc 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -114,12 +114,18 @@ static struct neighbour *fake_neigh_lookup(const struct dst_entry *dst, const vo
return NULL;
}
+static unsigned int fake_mtu(const struct dst_entry *dst)
+{
+ return dst->dev->mtu;
+}
+
static struct dst_ops fake_dst_ops = {
.family = AF_INET,
.protocol = cpu_to_be16(ETH_P_IP),
.update_pmtu = fake_update_pmtu,
.cow_metrics = fake_cow_metrics,
.neigh_lookup = fake_neigh_lookup,
+ .mtu = fake_mtu,
};
/*
next prev parent reply other threads:[~2011-12-22 6:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 15:52 BUG: unable to handle kernel NULL pointer dereference in ipv6_select_ident Chris Boot
2011-12-21 16:29 ` Eric Dumazet
2011-12-21 17:03 ` Chris Boot
2011-12-21 17:36 ` Eric Dumazet
2011-12-21 18:00 ` Eric Dumazet
2011-12-21 20:05 ` Chris Boot
2011-12-21 20:28 ` Eric Dumazet
2011-12-21 20:52 ` Eric Dumazet
2011-12-21 21:58 ` Chris Boot
2011-12-21 23:12 ` Chris Boot
2011-12-22 4:37 ` Eric Dumazet
2011-12-22 6:00 ` Eric Dumazet [this message]
2011-12-22 7:05 ` [PATCH] bridge: provide a mtu() method for fake_dst_ops Steffen Klassert
2011-12-22 6:38 ` BUG: unable to handle kernel NULL pointer dereference in ipv6_select_ident Steffen Klassert
2011-12-22 7:51 ` Eric Dumazet
2011-12-22 7:58 ` Steffen Klassert
2011-12-22 8:05 ` Eric Dumazet
2011-12-22 10:01 ` Steffen Klassert
2011-12-22 10:04 ` Chris Boot
2011-12-22 14:15 ` Eric Dumazet
2011-12-22 15:54 ` Chris Boot
2011-12-22 17:41 ` Eric Dumazet
2011-12-22 18:29 ` David Miller
2011-12-23 3:38 ` David Miller
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=1324533632.2621.35.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=bootc@bootc.net \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.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®