batman-adv: add UNICAST_4ADDR packet type

The current unicast packet type does not contain the orig source address. This
patches add a new unicast packet (called UNICAST_4ADDR) which provides two new
fields: the originator source address and the subtype (the type of the data
contained in the packet payload). The former is useful to identify the node
which injected the packet into the network and the latter is useful to avoid
creating new unicast packet types in the future: a macro defining a new subtype
will be enough.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
This commit is contained in:
Antonio Quartulli
2012-10-01 09:57:35 +02:00
parent f6c57a4609
commit 7cdcf6dddc
6 changed files with 194 additions and 26 deletions

View File

@@ -260,7 +260,7 @@ static int batadv_interface_tx(struct sk_buff *skb,
goto dropped;
}
ret = batadv_unicast_send_skb(skb, bat_priv);
ret = batadv_unicast_send_skb(bat_priv, skb);
if (ret != 0)
goto dropped_freed;
}