aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2015-04-01 16:36:27 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2015-04-02 04:41:14 -0400
commit0b67c43ce36a9964f1d5e3f973ee19eefd3f9f8f (patch)
tree1a1e1c9c5c37f8d8576fa6792b6525189e977e30 /net/bridge
parentc5035c77f89364d2da2871d829553bd1a4321940 (diff)
netfilter: bridge: really save frag_max_size between PRE and POST_ROUTING
We also need to save/store in forward, else br_parse_ip_options call will zero frag_max_size as well. Fixes: 93fdd47e5 ('bridge: Save frag_max_size between PRE_ROUTING and POST_ROUTING') Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_netfilter.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index f3884a1b942f..282ed76c49e0 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -686,6 +686,13 @@ static int br_nf_forward_finish(struct sk_buff *skb)
686 struct net_device *in; 686 struct net_device *in;
687 687
688 if (!IS_ARP(skb) && !IS_VLAN_ARP(skb)) { 688 if (!IS_ARP(skb) && !IS_VLAN_ARP(skb)) {
689 int frag_max_size;
690
691 if (skb->protocol == htons(ETH_P_IP)) {
692 frag_max_size = IPCB(skb)->frag_max_size;
693 BR_INPUT_SKB_CB(skb)->frag_max_size = frag_max_size;
694 }
695
689 in = nf_bridge->physindev; 696 in = nf_bridge->physindev;
690 if (nf_bridge->mask & BRNF_PKT_TYPE) { 697 if (nf_bridge->mask & BRNF_PKT_TYPE) {
691 skb->pkt_type = PACKET_OTHERHOST; 698 skb->pkt_type = PACKET_OTHERHOST;
@@ -745,8 +752,14 @@ static unsigned int br_nf_forward_ip(const struct nf_hook_ops *ops,
745 nf_bridge->mask |= BRNF_PKT_TYPE; 752 nf_bridge->mask |= BRNF_PKT_TYPE;
746 } 753 }
747 754
748 if (pf == NFPROTO_IPV4 && br_parse_ip_options(skb)) 755 if (pf == NFPROTO_IPV4) {
749 return NF_DROP; 756 int frag_max = BR_INPUT_SKB_CB(skb)->frag_max_size;
757
758 if (br_parse_ip_options(skb))
759 return NF_DROP;
760
761 IPCB(skb)->frag_max_size = frag_max;
762 }
750 763
751 nf_bridge->physoutdev = skb->dev; 764 nf_bridge->physoutdev = skb->dev;
752 if (pf == NFPROTO_IPV4) 765 if (pf == NFPROTO_IPV4)