treewide: fix replace nbd@openwrt.org with nbd@nbd.name
[openwrt.git] / target / linux / generic / patches-4.1 / 640-bridge_no_eap_forward.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Subject: [PATCH] bridge: no EAP forward
3
4 When bridging, do not forward EAP frames to other ports, only deliver
5 them locally.
6 Fixes WPA authentication issues with multiples APs that are connected to
7 each other via bridges.
8 ---
9 --- a/net/bridge/br_input.c
10 +++ b/net/bridge/br_input.c
11 @@ -162,7 +162,11 @@ int br_handle_frame_finish(struct sock *
12         if (IS_ENABLED(CONFIG_INET) && skb->protocol == htons(ETH_P_ARP))
13                 br_do_proxy_arp(skb, br, vid, p);
14  
15 -       if (is_broadcast_ether_addr(dest)) {
16 +       if (skb->protocol == htons(ETH_P_PAE)) {
17 +               skb2 = skb;
18 +               /* Do not forward 802.1x/EAP frames */
19 +               skb = NULL;
20 +       } else if (is_broadcast_ether_addr(dest)) {
21                 skb2 = skb;
22                 unicast = false;
23         } else if (is_multicast_ether_addr(dest)) {