Re: Bug: ebtables snat drops small packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



timothee.cocault@xxxxxxxxxx <timothee.cocault@xxxxxxxxxx> wrote:
> Hi !
> 
> I noticed a bug when using the snat module of ebtables.
> If the ethernet payload of a packet is less than 12 bytes, the packet gets dropped.
> 
> I traced it down to this commit which changes calls to `skb_make_writable` to `skb_ensure_writable` :
> https://github.com/torvalds/linux/commit/c1a8311679014a79b04c039e32bde34fb68952fd
> 
> The diff gives a clear hint of the bug. For example, in `net/bridge/netfilter/ebt_snat.c` :
> 
> -   if (!skb_make_writable(skb, 0))
> +   if (skb_ensure_writable(skb, ETH_ALEN * 2))
>         return EBT_DROP;

Can you send a formal patch that fixes this up for all callers?

Thanks.



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux