mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
bridge: move mac header copying into br_netfilter
The mac header only has to be copied back into the skb for fragments generated by ip_fragment(), which only happens for bridge forwarded packets with nf-call-iptables=1 && active nf_defrag. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
1cae565e8b
commit
8bd63cf1a4
3 changed files with 29 additions and 35 deletions
|
@ -37,9 +37,7 @@ static inline int should_deliver(const struct net_bridge_port *p,
|
|||
|
||||
int br_dev_queue_push_xmit(struct sk_buff *skb)
|
||||
{
|
||||
/* ip_fragment doesn't copy the MAC header */
|
||||
if (nf_bridge_maybe_copy_header(skb) ||
|
||||
!is_skb_forwardable(skb->dev, skb)) {
|
||||
if (!is_skb_forwardable(skb->dev, skb)) {
|
||||
kfree_skb(skb);
|
||||
} else {
|
||||
skb_push(skb, ETH_HLEN);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue