Skip to content

Commit 87f94b4

Browse files
committed
bridge: Clear INET control block of SKBs passed into ip_fragment().
In a similar vain to commit 1776206 ("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: Bandan Das <bandan.das@stratus.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 24cd804 commit 87f94b4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

net/bridge/br_netfilter.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,9 +761,11 @@ static int br_nf_dev_queue_xmit(struct sk_buff *skb)
761761
{
762762
if (skb->nfct != NULL && skb->protocol == htons(ETH_P_IP) &&
763763
skb->len + nf_bridge_mtu_reduction(skb) > skb->dev->mtu &&
764-
!skb_is_gso(skb))
764+
!skb_is_gso(skb)) {
765+
/* BUG: Should really parse the IP options here. */
766+
memset(IPCB(skb), 0, sizeof(struct inet_skb_parm));
765767
return ip_fragment(skb, br_dev_queue_push_xmit);
766-
else
768+
} else
767769
return br_dev_queue_push_xmit(skb);
768770
}
769771
#else

0 commit comments

Comments
 (0)