]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/raw.c
[SCSI] in2000: convert to accessors and !use_sg cleanup
[linux-2.6-omap-h63xx.git] / net / ipv4 / raw.c
index 66b42f547bf9c0b21bd2462a4534e54978b2813f..e7050f8eabebb63c6d0e3f46b55e4aef65da96b4 100644 (file)
@@ -271,6 +271,7 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length,
        int hh_len;
        struct iphdr *iph;
        struct sk_buff *skb;
+       unsigned int iphlen;
        int err;
 
        if (length > rt->u.dst.dev->mtu) {
@@ -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) {
                if (!iph->saddr)
                        iph->saddr = rt->rt_src;
                iph->check   = 0;