diff options
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/routing.c | 10 | ||||
-rw-r--r-- | net/batman-adv/soft-interface.c | 6 | ||||
-rw-r--r-- | net/batman-adv/soft-interface.h | 5 |
3 files changed, 14 insertions, 7 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index 9f933c95dc0e..939fc01371df 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c | |||
@@ -1012,8 +1012,9 @@ int batadv_recv_unicast_packet(struct sk_buff *skb, | |||
1012 | 1012 | ||
1013 | /* packet for me */ | 1013 | /* packet for me */ |
1014 | if (batadv_is_my_mac(unicast_packet->dest)) { | 1014 | if (batadv_is_my_mac(unicast_packet->dest)) { |
1015 | batadv_interface_rx(recv_if->soft_iface, skb, recv_if, | 1015 | batadv_interface_rx(recv_if->soft_iface, skb, recv_if, hdr_size, |
1016 | hdr_size); | 1016 | NULL); |
1017 | |||
1017 | return NET_RX_SUCCESS; | 1018 | return NET_RX_SUCCESS; |
1018 | } | 1019 | } |
1019 | 1020 | ||
@@ -1050,7 +1051,7 @@ int batadv_recv_ucast_frag_packet(struct sk_buff *skb, | |||
1050 | return NET_RX_SUCCESS; | 1051 | return NET_RX_SUCCESS; |
1051 | 1052 | ||
1052 | batadv_interface_rx(recv_if->soft_iface, new_skb, recv_if, | 1053 | batadv_interface_rx(recv_if->soft_iface, new_skb, recv_if, |
1053 | sizeof(struct batadv_unicast_packet)); | 1054 | sizeof(struct batadv_unicast_packet), NULL); |
1054 | return NET_RX_SUCCESS; | 1055 | return NET_RX_SUCCESS; |
1055 | } | 1056 | } |
1056 | 1057 | ||
@@ -1137,7 +1138,8 @@ int batadv_recv_bcast_packet(struct sk_buff *skb, | |||
1137 | goto out; | 1138 | goto out; |
1138 | 1139 | ||
1139 | /* broadcast for me */ | 1140 | /* broadcast for me */ |
1140 | batadv_interface_rx(recv_if->soft_iface, skb, recv_if, hdr_size); | 1141 | batadv_interface_rx(recv_if->soft_iface, skb, recv_if, hdr_size, |
1142 | orig_node); | ||
1141 | ret = NET_RX_SUCCESS; | 1143 | ret = NET_RX_SUCCESS; |
1142 | goto out; | 1144 | goto out; |
1143 | 1145 | ||
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 03b0763abd2f..7b683e0bd668 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -270,7 +270,7 @@ end: | |||
270 | 270 | ||
271 | void batadv_interface_rx(struct net_device *soft_iface, | 271 | void batadv_interface_rx(struct net_device *soft_iface, |
272 | struct sk_buff *skb, struct batadv_hard_iface *recv_if, | 272 | struct sk_buff *skb, struct batadv_hard_iface *recv_if, |
273 | int hdr_size) | 273 | int hdr_size, struct batadv_orig_node *orig_node) |
274 | { | 274 | { |
275 | struct batadv_priv *bat_priv = netdev_priv(soft_iface); | 275 | struct batadv_priv *bat_priv = netdev_priv(soft_iface); |
276 | struct ethhdr *ethhdr; | 276 | struct ethhdr *ethhdr; |
@@ -322,6 +322,10 @@ void batadv_interface_rx(struct net_device *soft_iface, | |||
322 | 322 | ||
323 | soft_iface->last_rx = jiffies; | 323 | soft_iface->last_rx = jiffies; |
324 | 324 | ||
325 | if (orig_node) | ||
326 | batadv_tt_add_temporary_global_entry(bat_priv, orig_node, | ||
327 | ethhdr->h_source); | ||
328 | |||
325 | if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest)) | 329 | if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest)) |
326 | goto dropped; | 330 | goto dropped; |
327 | 331 | ||
diff --git a/net/batman-adv/soft-interface.h b/net/batman-adv/soft-interface.h index 852c683b06a1..07a08fed28b9 100644 --- a/net/batman-adv/soft-interface.h +++ b/net/batman-adv/soft-interface.h | |||
@@ -21,8 +21,9 @@ | |||
21 | #define _NET_BATMAN_ADV_SOFT_INTERFACE_H_ | 21 | #define _NET_BATMAN_ADV_SOFT_INTERFACE_H_ |
22 | 22 | ||
23 | int batadv_skb_head_push(struct sk_buff *skb, unsigned int len); | 23 | int batadv_skb_head_push(struct sk_buff *skb, unsigned int len); |
24 | void batadv_interface_rx(struct net_device *soft_iface, struct sk_buff *skb, | 24 | void batadv_interface_rx(struct net_device *soft_iface, |
25 | struct batadv_hard_iface *recv_if, int hdr_size); | 25 | struct sk_buff *skb, struct batadv_hard_iface *recv_if, |
26 | int hdr_size, struct batadv_orig_node *orig_node); | ||
26 | struct net_device *batadv_softif_create(const char *name); | 27 | struct net_device *batadv_softif_create(const char *name); |
27 | void batadv_softif_destroy(struct net_device *soft_iface); | 28 | void batadv_softif_destroy(struct net_device *soft_iface); |
28 | int batadv_softif_is_valid(const struct net_device *net_dev); | 29 | int batadv_softif_is_valid(const struct net_device *net_dev); |