Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327598
b: refs/heads/master
c: 3eb8773
h: refs/heads/master
v: v3
  • Loading branch information
Simon Wunderlich authored and Antonio Quartulli committed Aug 23, 2012
1 parent 62da7bf commit 609a07a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99e966fc969360bed8d3bb71c144fa10ba7a12d0
refs/heads/master: 3eb8773e3a24d88ca528993af3756af70f307a82
18 changes: 9 additions & 9 deletions trunk/net/batman-adv/bridge_loop_avoidance.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,15 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, uint8_t *mac,

/* now we pretend that the client would have sent this ... */
switch (claimtype) {
case BATADV_CLAIM_TYPE_ADD:
case BATADV_CLAIM_TYPE_CLAIM:
/* normal claim frame
* set Ethernet SRC to the clients mac
*/
memcpy(ethhdr->h_source, mac, ETH_ALEN);
batadv_dbg(BATADV_DBG_BLA, bat_priv,
"bla_send_claim(): CLAIM %pM on vid %d\n", mac, vid);
break;
case BATADV_CLAIM_TYPE_DEL:
case BATADV_CLAIM_TYPE_UNCLAIM:
/* unclaim frame
* set HW SRC to the clients mac
*/
Expand Down Expand Up @@ -468,7 +468,7 @@ static void batadv_bla_answer_request(struct batadv_priv *bat_priv,
continue;

batadv_bla_send_claim(bat_priv, claim->addr, claim->vid,
BATADV_CLAIM_TYPE_ADD);
BATADV_CLAIM_TYPE_CLAIM);
}
rcu_read_unlock();
}
Expand Down Expand Up @@ -703,7 +703,7 @@ static int batadv_handle_unclaim(struct batadv_priv *bat_priv,
if (primary_if && batadv_compare_eth(backbone_addr,
primary_if->net_dev->dev_addr))
batadv_bla_send_claim(bat_priv, claim_addr, vid,
BATADV_CLAIM_TYPE_DEL);
BATADV_CLAIM_TYPE_UNCLAIM);

backbone_gw = batadv_backbone_hash_find(bat_priv, backbone_addr, vid);

Expand Down Expand Up @@ -739,7 +739,7 @@ static int batadv_handle_claim(struct batadv_priv *bat_priv,
batadv_bla_add_claim(bat_priv, claim_addr, vid, backbone_gw);
if (batadv_compare_eth(backbone_addr, primary_if->net_dev->dev_addr))
batadv_bla_send_claim(bat_priv, claim_addr, vid,
BATADV_CLAIM_TYPE_ADD);
BATADV_CLAIM_TYPE_CLAIM);

/* TODO: we could call something like tt_local_del() here. */

Expand Down Expand Up @@ -784,12 +784,12 @@ static int batadv_check_claim_group(struct batadv_priv *bat_priv,
* otherwise assume it is in the hw_src
*/
switch (bla_dst->type) {
case BATADV_CLAIM_TYPE_ADD:
case BATADV_CLAIM_TYPE_CLAIM:
backbone_addr = hw_src;
break;
case BATADV_CLAIM_TYPE_REQUEST:
case BATADV_CLAIM_TYPE_ANNOUNCE:
case BATADV_CLAIM_TYPE_DEL:
case BATADV_CLAIM_TYPE_UNCLAIM:
backbone_addr = ethhdr->h_source;
break;
default:
Expand Down Expand Up @@ -905,12 +905,12 @@ static int batadv_bla_process_claim(struct batadv_priv *bat_priv,

/* check for the different types of claim frames ... */
switch (bla_dst->type) {
case BATADV_CLAIM_TYPE_ADD:
case BATADV_CLAIM_TYPE_CLAIM:
if (batadv_handle_claim(bat_priv, primary_if, hw_src,
ethhdr->h_source, vid))
return 1;
break;
case BATADV_CLAIM_TYPE_DEL:
case BATADV_CLAIM_TYPE_UNCLAIM:
if (batadv_handle_unclaim(bat_priv, primary_if,
ethhdr->h_source, hw_src, vid))
return 1;
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/batman-adv/packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ enum batadv_tt_client_flags {

/* claim frame types for the bridge loop avoidance */
enum batadv_bla_claimframe {
BATADV_CLAIM_TYPE_ADD = 0x00,
BATADV_CLAIM_TYPE_DEL = 0x01,
BATADV_CLAIM_TYPE_CLAIM = 0x00,
BATADV_CLAIM_TYPE_UNCLAIM = 0x01,
BATADV_CLAIM_TYPE_ANNOUNCE = 0x02,
BATADV_CLAIM_TYPE_REQUEST = 0x03,
};
Expand Down

0 comments on commit 609a07a

Please sign in to comment.