projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
435f08a
)
bridge: Pull ip header into skb->data before looking into ip header.
author
Sarveshwar Bandi
<
[email protected]
>
Wed, 10 Oct 2012 01:15:01 +0000
(
01:15
+0000)
committer
David S. Miller
<
[email protected]
>
Thu, 11 Oct 2012 02:50:45 +0000
(22:50 -0400)
If lower layer driver leaves the ip header in the skb fragment, it needs to
be first pulled into skb->data before inspecting ip header length or ip version
number.
Signed-off-by: Sarveshwar Bandi <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/bridge/br_netfilter.c
patch
|
blob
|
history
diff --git
a/net/bridge/br_netfilter.c
b/net/bridge/br_netfilter.c
index 68e8f364bbf8e01fbae9134eb98a24fa676d0e51..fe43bc7b063f5f49b31c237f3f418b56de15379d 100644
(file)
--- a/
net/bridge/br_netfilter.c
+++ b/
net/bridge/br_netfilter.c
@@
-265,6
+265,9
@@
static int br_parse_ip_options(struct sk_buff *skb)
struct net_device *dev = skb->dev;
u32 len;
+ if (!pskb_may_pull(skb, sizeof(struct iphdr)))
+ goto inhdr_error;
+
iph = ip_hdr(skb);
opt = &(IPCB(skb)->opt);