aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/routing.c
diff options
context:
space:
mode:
authorSimon Wunderlich <siwu@hrz.tu-chemnitz.de>2013-04-25 05:57:42 -0400
committerAntonio Quartulli <antonio@meshcoding.com>2013-10-09 15:22:32 -0400
commit9f4980e68b4b72e6a4d7caadfacc54260d05ebf6 (patch)
treeddff273e32b44ba11aefcf9d380f47563504a194 /net/batman-adv/routing.c
parent0035f97e65761099cbfa9554ee8cd9bfc395eeea (diff)
batman-adv: remove vis functionality
This is replaced by a userspace program, we don't need this functionality to bloat the kernel. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Diffstat (limited to 'net/batman-adv/routing.c')
-rw-r--r--net/batman-adv/routing.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index a5bf8fffdcea..2a9318bd9026 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -25,7 +25,6 @@
25#include "icmp_socket.h" 25#include "icmp_socket.h"
26#include "translation-table.h" 26#include "translation-table.h"
27#include "originator.h" 27#include "originator.h"
28#include "vis.h"
29#include "unicast.h" 28#include "unicast.h"
30#include "bridge_loop_avoidance.h" 29#include "bridge_loop_avoidance.h"
31#include "distributed-arp-table.h" 30#include "distributed-arp-table.h"
@@ -1168,53 +1167,3 @@ out:
1168 batadv_orig_node_free_ref(orig_node); 1167 batadv_orig_node_free_ref(orig_node);
1169 return ret; 1168 return ret;
1170} 1169}
1171
1172int batadv_recv_vis_packet(struct sk_buff *skb,
1173 struct batadv_hard_iface *recv_if)
1174{
1175 struct batadv_vis_packet *vis_packet;
1176 struct ethhdr *ethhdr;
1177 struct batadv_priv *bat_priv = netdev_priv(recv_if->soft_iface);
1178 int hdr_size = sizeof(*vis_packet);
1179
1180 /* keep skb linear */
1181 if (skb_linearize(skb) < 0)
1182 return NET_RX_DROP;
1183
1184 if (unlikely(!pskb_may_pull(skb, hdr_size)))
1185 return NET_RX_DROP;
1186
1187 vis_packet = (struct batadv_vis_packet *)skb->data;
1188 ethhdr = eth_hdr(skb);
1189
1190 /* not for me */
1191 if (!batadv_is_my_mac(bat_priv, ethhdr->h_dest))
1192 return NET_RX_DROP;
1193
1194 /* ignore own packets */
1195 if (batadv_is_my_mac(bat_priv, vis_packet->vis_orig))
1196 return NET_RX_DROP;
1197
1198 if (batadv_is_my_mac(bat_priv, vis_packet->sender_orig))
1199 return NET_RX_DROP;
1200
1201 switch (vis_packet->vis_type) {
1202 case BATADV_VIS_TYPE_SERVER_SYNC:
1203 batadv_receive_server_sync_packet(bat_priv, vis_packet,
1204 skb_headlen(skb));
1205 break;
1206
1207 case BATADV_VIS_TYPE_CLIENT_UPDATE:
1208 batadv_receive_client_update_packet(bat_priv, vis_packet,
1209 skb_headlen(skb));
1210 break;
1211
1212 default: /* ignore unknown packet */
1213 break;
1214 }
1215
1216 /* We take a copy of the data in the packet, so we should
1217 * always free the skbuf.
1218 */
1219 return NET_RX_DROP;
1220}