Thread (6 messages) 6 messages, 2 authors, 2012-08-21

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

On Monday, July 30, 2012 00:50:03 Antonio Quartulli wrote:
quoted hunk ↗ jump to hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help