Re: [B.A.T.M.A.N.] [PATCH] batman-adv: use check_unicast_packet() in recv_roam_adv()
From: Marek Lindner <hidden>
Date: 2012-07-30 07:56:51
From: Marek Lindner <hidden>
Date: 2012-07-30 07:56:51
On Monday, July 30, 2012 00:50:03 Antonio Quartulli wrote:
@@ -687,21 +687,9 @@ int batadv_recv_roam_adv(struct sk_buff *skb, structbatadv_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