vserver 1.9.3
[linux-2.6.git] / net / ipv4 / ipvs / ip_vs_proto_ah.c
index ffea536..453e94a 100644 (file)
@@ -129,14 +129,15 @@ ah_debug_packet(struct ip_vs_protocol *pp, const struct sk_buff *skb,
                int offset, const char *msg)
 {
        char buf[256];
-       struct iphdr iph;
+       struct iphdr _iph, *ih;
 
-       if (skb_copy_bits(skb, offset, &iph, sizeof(iph)) < 0)
+       ih = skb_header_pointer(skb, offset, sizeof(_iph), &_iph);
+       if (ih == NULL)
                sprintf(buf, "%s TRUNCATED", pp->name);
        else
                sprintf(buf, "%s %u.%u.%u.%u->%u.%u.%u.%u",
-                       pp->name, NIPQUAD(iph.saddr),
-                       NIPQUAD(iph.daddr));
+                       pp->name, NIPQUAD(ih->saddr),
+                       NIPQUAD(ih->daddr));
 
        printk(KERN_DEBUG "IPVS: %s: %s\n", msg, buf);
 }