X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fipv4%2Fipvs%2Fip_vs_proto_ah.c;h=453e94a0bbd7330cb58d26dcb607260751d46770;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=ffea536b09a809a41ae6ea58a221a4b23a4b12d4;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/net/ipv4/ipvs/ip_vs_proto_ah.c b/net/ipv4/ipvs/ip_vs_proto_ah.c index ffea536b0..453e94a0b 100644 --- a/net/ipv4/ipvs/ip_vs_proto_ah.c +++ b/net/ipv4/ipvs/ip_vs_proto_ah.c @@ -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); }