diff options
author | Antonio Quartulli <antonio@open-mesh.com> | 2013-06-04 06:11:39 -0400 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2013-10-19 09:11:21 -0400 |
commit | c018ad3de61a1dc4194879a53e5559e094aa7b1a (patch) | |
tree | 4edb9c156b618dae46d38249a5c817e0d1f1e2b0 /net/batman-adv/send.c | |
parent | bc58eeef744df93e141678ef44452f0869cd563d (diff) |
batman-adv: add the VLAN ID attribute to the TT entry
To make the translation table code VLAN-aware, each entry
must carry the VLAN ID which it belongs to. This patch adds
such attribute to the related TT structures.
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/send.c')
-rw-r--r-- | net/batman-adv/send.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c index d765d53f8201..acaa7ffff245 100644 --- a/net/batman-adv/send.c +++ b/net/batman-adv/send.c | |||
@@ -240,12 +240,14 @@ out: | |||
240 | * @packet_type: the batman unicast packet type to use | 240 | * @packet_type: the batman unicast packet type to use |
241 | * @packet_subtype: the unicast 4addr packet subtype (only relevant for unicast | 241 | * @packet_subtype: the unicast 4addr packet subtype (only relevant for unicast |
242 | * 4addr packets) | 242 | * 4addr packets) |
243 | * @vid: the vid to be used to search the translation table | ||
243 | * | 244 | * |
244 | * Returns 1 in case of error or 0 otherwise. | 245 | * Returns 1 in case of error or 0 otherwise. |
245 | */ | 246 | */ |
246 | int batadv_send_skb_generic_unicast(struct batadv_priv *bat_priv, | 247 | int batadv_send_skb_generic_unicast(struct batadv_priv *bat_priv, |
247 | struct sk_buff *skb, int packet_type, | 248 | struct sk_buff *skb, int packet_type, |
248 | int packet_subtype) | 249 | int packet_subtype, |
250 | unsigned short vid) | ||
249 | { | 251 | { |
250 | struct ethhdr *ethhdr = (struct ethhdr *)skb->data; | 252 | struct ethhdr *ethhdr = (struct ethhdr *)skb->data; |
251 | struct batadv_unicast_packet *unicast_packet; | 253 | struct batadv_unicast_packet *unicast_packet; |
@@ -260,7 +262,7 @@ int batadv_send_skb_generic_unicast(struct batadv_priv *bat_priv, | |||
260 | * returns NULL in case of AP isolation | 262 | * returns NULL in case of AP isolation |
261 | */ | 263 | */ |
262 | orig_node = batadv_transtable_search(bat_priv, ethhdr->h_source, | 264 | orig_node = batadv_transtable_search(bat_priv, ethhdr->h_source, |
263 | ethhdr->h_dest); | 265 | ethhdr->h_dest, vid); |
264 | 266 | ||
265 | if (!orig_node) | 267 | if (!orig_node) |
266 | goto out; | 268 | goto out; |
@@ -290,7 +292,7 @@ int batadv_send_skb_generic_unicast(struct batadv_priv *bat_priv, | |||
290 | * try to reroute it because the ttvn contained in the header is less | 292 | * try to reroute it because the ttvn contained in the header is less |
291 | * than the current one | 293 | * than the current one |
292 | */ | 294 | */ |
293 | if (batadv_tt_global_client_is_roaming(bat_priv, ethhdr->h_dest)) | 295 | if (batadv_tt_global_client_is_roaming(bat_priv, ethhdr->h_dest, vid)) |
294 | unicast_packet->ttvn = unicast_packet->ttvn - 1; | 296 | unicast_packet->ttvn = unicast_packet->ttvn - 1; |
295 | 297 | ||
296 | if (batadv_send_skb_to_orig(skb, orig_node, NULL) != NET_XMIT_DROP) | 298 | if (batadv_send_skb_to_orig(skb, orig_node, NULL) != NET_XMIT_DROP) |