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: Antonio Quartulli <hidden>
Date: 2012-07-30 09:20:47

On Mon, Jul 30, 2012 at 09:56:51AM +0200, Marek Lindner wrote:
On Monday, July 30, 2012 00:50:03 Antonio Quartulli wrote:
quoted
@@ -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); ?
right. I copy/pasted the old code and I forgot to change it.
Will fix.

Thanks

Regards,
Marek
-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

Attachments

  • (unnamed) [application/pgp-signature] 198 bytes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help