On Sun, Jan 06, 2008 at 01:57:13AM +0100, Jan Engelhardt wrote: > > >@@ -304,7 +305,8 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length, > > goto error_fault; > > > > /* We don't modify invalid header */ > >- if (length >= sizeof(*iph) && iph->ihl * 4U <= length) { > >+ iphlen = iph->ihl * 4; > >+ if (iphlen >= sizeof(*iph) && iphlen <= length) { > > Humm, this could use ip_hdrlen(skb) :-) That would not necessarily be an improvement since we'd have to reload the values from skb. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html