Commit 87f94b4e authored by David S. Miller's avatar David S. Miller
Browse files

bridge: Clear INET control block of SKBs passed into ip_fragment().

In a similar vain to commit 17762060


("bridge: Clear IPCB before possible entry into IP stack")

Any time we call into the IP stack we have to make sure the state
there is as expected by the ipv4 code.

With help from Eric Dumazet and Herbert Xu.

Reported-by: default avatarBandan Das <bandan.das@stratus.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 24cd804d
...@@ -761,9 +761,11 @@ static int br_nf_dev_queue_xmit(struct sk_buff *skb) ...@@ -761,9 +761,11 @@ static int br_nf_dev_queue_xmit(struct sk_buff *skb)
{ {
if (skb->nfct != NULL && skb->protocol == htons(ETH_P_IP) && if (skb->nfct != NULL && skb->protocol == htons(ETH_P_IP) &&
skb->len + nf_bridge_mtu_reduction(skb) > skb->dev->mtu && skb->len + nf_bridge_mtu_reduction(skb) > skb->dev->mtu &&
!skb_is_gso(skb)) !skb_is_gso(skb)) {
/* BUG: Should really parse the IP options here. */
memset(IPCB(skb), 0, sizeof(struct inet_skb_parm));
return ip_fragment(skb, br_dev_queue_push_xmit); return ip_fragment(skb, br_dev_queue_push_xmit);
else } else
return br_dev_queue_push_xmit(skb); return br_dev_queue_push_xmit(skb);
} }
#else #else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment