On Fri, May 06, 2016 at 10:58:23AM +0200, Andreas Pape wrote:
+void batadv_dat_entry_check(struct batadv_priv *bat_priv, struct sk_buff *skb,
unsigned short vid)
+{
[...]
- if (iphdr) {
batadv_dbg(BATADV_DBG_DAT, bat_priv,
"Snooped IP address: %pI4 %pM (vid: %d)\n",
&iphdr->saddr, ethhdr->h_source,
BATADV_PRINT_VID(vid));
batadv_dat_entry_add(bat_priv, iphdr->saddr,
ethhdr->h_source, vid);
- }
Not sure whether it is necessary, or whether there is a check somewhere later within DAT. But should we exclude some iphdr->saddr or ethhdr->h_source addresses? For instance a DHCPDISCOVER usually has a zero-ip address.