ar71xx: keep the RouterBOARD Power LED in On state
[oweals/openwrt.git] / target / linux / generic / patches-4.9 / 640-bridge-only-accept-EAP-locally.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Subject: [PATCH] bridge: only accept EAP locally
3
4 When bridging, do not forward EAP frames to other ports, only deliver
5 them locally, regardless of the state.
6
7 Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 ---
9 --- a/net/bridge/br_input.c
10 +++ b/net/bridge/br_input.c
11 @@ -164,11 +164,14 @@ int br_handle_frame_finish(struct net *n
12                 }
13         }
14  
15 +       BR_INPUT_SKB_CB(skb)->brdev = br->dev;
16 +
17 +       if (skb->protocol == htons(ETH_P_PAE))
18 +               return br_pass_frame_up(skb);
19 +
20         if (p->state == BR_STATE_LEARNING)
21                 goto drop;
22  
23 -       BR_INPUT_SKB_CB(skb)->brdev = br->dev;
24 -
25         if (IS_ENABLED(CONFIG_INET) && skb->protocol == htons(ETH_P_ARP))
26                 br_do_proxy_arp(skb, br, vid, p);
27