diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-11 02:56:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-11 02:56:33 -0400 |
commit | 04c9f416e371cff076a8b3279fb213628915d059 (patch) | |
tree | 2b64cb835cbc9d19d2d06f1e7618615d40ada0af /net/batman-adv/bridge_loop_avoidance.c | |
parent | c278fa53c123282f753b2264fc62c0e9502a32fa (diff) | |
parent | c1f5163de417dab01fa9daaf09a74bbb19303f3c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
net/batman-adv/bridge_loop_avoidance.c
net/batman-adv/bridge_loop_avoidance.h
net/batman-adv/soft-interface.c
net/mac80211/mlme.c
With merge help from Antonio Quartulli (batman-adv) and
Stephen Rothwell (drivers/net/usb/qmi_wwan.c).
The net/mac80211/mlme.c conflict seemed easy enough, accounting for a
conversion to some new tracing macros.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/batman-adv/bridge_loop_avoidance.c')
-rw-r--r-- | net/batman-adv/bridge_loop_avoidance.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index 3483e4035cbe..6705d35b17ce 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c | |||
@@ -1381,6 +1381,7 @@ void batadv_bla_free(struct batadv_priv *bat_priv) | |||
1381 | * @bat_priv: the bat priv with all the soft interface information | 1381 | * @bat_priv: the bat priv with all the soft interface information |
1382 | * @skb: the frame to be checked | 1382 | * @skb: the frame to be checked |
1383 | * @vid: the VLAN ID of the frame | 1383 | * @vid: the VLAN ID of the frame |
1384 | * @is_bcast: the packet came in a broadcast packet type. | ||
1384 | * | 1385 | * |
1385 | * bla_rx avoidance checks if: | 1386 | * bla_rx avoidance checks if: |
1386 | * * we have to race for a claim | 1387 | * * we have to race for a claim |
@@ -1390,7 +1391,8 @@ void batadv_bla_free(struct batadv_priv *bat_priv) | |||
1390 | * returns 1, otherwise it returns 0 and the caller shall further | 1391 | * returns 1, otherwise it returns 0 and the caller shall further |
1391 | * process the skb. | 1392 | * process the skb. |
1392 | */ | 1393 | */ |
1393 | int batadv_bla_rx(struct batadv_priv *bat_priv, struct sk_buff *skb, short vid) | 1394 | int batadv_bla_rx(struct batadv_priv *bat_priv, struct sk_buff *skb, short vid, |
1395 | bool is_bcast) | ||
1394 | { | 1396 | { |
1395 | struct ethhdr *ethhdr; | 1397 | struct ethhdr *ethhdr; |
1396 | struct batadv_claim search_claim, *claim = NULL; | 1398 | struct batadv_claim search_claim, *claim = NULL; |
@@ -1409,7 +1411,7 @@ int batadv_bla_rx(struct batadv_priv *bat_priv, struct sk_buff *skb, short vid) | |||
1409 | 1411 | ||
1410 | if (unlikely(atomic_read(&bat_priv->bla_num_requests))) | 1412 | if (unlikely(atomic_read(&bat_priv->bla_num_requests))) |
1411 | /* don't allow broadcasts while requests are in flight */ | 1413 | /* don't allow broadcasts while requests are in flight */ |
1412 | if (is_multicast_ether_addr(ethhdr->h_dest)) | 1414 | if (is_multicast_ether_addr(ethhdr->h_dest) && is_bcast) |
1413 | goto handled; | 1415 | goto handled; |
1414 | 1416 | ||
1415 | memcpy(search_claim.addr, ethhdr->h_source, ETH_ALEN); | 1417 | memcpy(search_claim.addr, ethhdr->h_source, ETH_ALEN); |
@@ -1435,8 +1437,13 @@ int batadv_bla_rx(struct batadv_priv *bat_priv, struct sk_buff *skb, short vid) | |||
1435 | } | 1437 | } |
1436 | 1438 | ||
1437 | /* if it is a broadcast ... */ | 1439 | /* if it is a broadcast ... */ |
1438 | if (is_multicast_ether_addr(ethhdr->h_dest)) { | 1440 | if (is_multicast_ether_addr(ethhdr->h_dest) && is_bcast) { |
1439 | /* ... drop it. the responsible gateway is in charge. */ | 1441 | /* ... drop it. the responsible gateway is in charge. |
1442 | * | ||
1443 | * We need to check is_bcast because with the gateway | ||
1444 | * feature, broadcasts (like DHCP requests) may be sent | ||
1445 | * using a unicast packet type. | ||
1446 | */ | ||
1440 | goto handled; | 1447 | goto handled; |
1441 | } else { | 1448 | } else { |
1442 | /* seems the client considers us as its best gateway. | 1449 | /* seems the client considers us as its best gateway. |