netfilter: ebtables: Fixes dropping of small packets in bridge nat
[platform/kernel/linux-starfive.git] / net / bridge / netfilter / ebt_snat.c
index 27443bf..7dfbcdf 100644 (file)
@@ -22,7 +22,7 @@ ebt_snat_tg(struct sk_buff *skb, const struct xt_action_param *par)
 {
        const struct ebt_nat_info *info = par->targinfo;
 
-       if (skb_ensure_writable(skb, ETH_ALEN * 2))
+       if (skb_ensure_writable(skb, 0))
                return EBT_DROP;
 
        ether_addr_copy(eth_hdr(skb)->h_source, info->mac);