summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/send.c
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@open-mesh.com>2013-06-04 12:11:39 +0200
committerAntonio Quartulli <antonio@meshcoding.com>2013-10-19 15:11:21 +0200
commitc018ad3de61a1dc4194879a53e5559e094aa7b1a (patch)
tree4edb9c156b618dae46d38249a5c817e0d1f1e2b0 /net/batman-adv/send.c
parentbc58eeef744df93e141678ef44452f0869cd563d (diff)
downloadop-kernel-dev-c018ad3de61a1dc4194879a53e5559e094aa7b1a.zip
op-kernel-dev-c018ad3de61a1dc4194879a53e5559e094aa7b1a.tar.gz
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.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index d765d53..acaa7ff 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -240,12 +240,14 @@ out:
* @packet_type: the batman unicast packet type to use
* @packet_subtype: the unicast 4addr packet subtype (only relevant for unicast
* 4addr packets)
+ * @vid: the vid to be used to search the translation table
*
* Returns 1 in case of error or 0 otherwise.
*/
int batadv_send_skb_generic_unicast(struct batadv_priv *bat_priv,
struct sk_buff *skb, int packet_type,
- int packet_subtype)
+ int packet_subtype,
+ unsigned short vid)
{
struct ethhdr *ethhdr = (struct ethhdr *)skb->data;
struct batadv_unicast_packet *unicast_packet;
@@ -260,7 +262,7 @@ int batadv_send_skb_generic_unicast(struct batadv_priv *bat_priv,
* returns NULL in case of AP isolation
*/
orig_node = batadv_transtable_search(bat_priv, ethhdr->h_source,
- ethhdr->h_dest);
+ ethhdr->h_dest, vid);
if (!orig_node)
goto out;
@@ -290,7 +292,7 @@ int batadv_send_skb_generic_unicast(struct batadv_priv *bat_priv,
* try to reroute it because the ttvn contained in the header is less
* than the current one
*/
- if (batadv_tt_global_client_is_roaming(bat_priv, ethhdr->h_dest))
+ if (batadv_tt_global_client_is_roaming(bat_priv, ethhdr->h_dest, vid))
unicast_packet->ttvn = unicast_packet->ttvn - 1;
if (batadv_send_skb_to_orig(skb, orig_node, NULL) != NET_XMIT_DROP)
OpenPOWER on IntegriCloud