On Monday, July 30, 2012 00:50:03 Antonio Quartulli wrote:
@@ -687,21 +687,9 @@ int batadv_recv_roam_adv(struct sk_buff *skb, struct batadv_hard_iface *recv_if) struct batadv_priv *bat_priv = netdev_priv(recv_if->soft_iface); struct batadv_roam_adv_packet *roam_adv_packet; struct batadv_orig_node *orig_node;
- struct ethhdr *ethhdr;
- /* drop packet if it has not necessary minimum size */
- if (unlikely(!pskb_may_pull(skb,
sizeof(struct batadv_roam_adv_packet))))
goto out;
- int hdr_size = sizeof(struct batadv_roam_adv_packet);
Shouldn't we do: int hdr_size = sizeof(*roam_adv_packet); ?
Regards, Marek