ipv4: ipmr: support multiple tables
[safe/jmp/linux-2.6] / net / ipv4 / ah4.c
index d07b0c1..880a5ec 100644 (file)
@@ -1,6 +1,7 @@
 #include <crypto/hash.h>
 #include <linux/err.h>
 #include <linux/module.h>
+#include <linux/slab.h>
 #include <net/ip.h>
 #include <net/xfrm.h>
 #include <net/ah.h>
@@ -393,7 +394,7 @@ static void ah4_err(struct sk_buff *skb, u32 info)
            icmp_hdr(skb)->code != ICMP_FRAG_NEEDED)
                return;
 
-       x = xfrm_state_lookup(net, (xfrm_address_t *)&iph->daddr, ah->spi, IPPROTO_AH, AF_INET);
+       x = xfrm_state_lookup(net, skb->mark, (xfrm_address_t *)&iph->daddr, ah->spi, IPPROTO_AH, AF_INET);
        if (!x)
                return;
        printk(KERN_DEBUG "pmtu discovery on SA AH/%08x/%08x\n",
@@ -444,7 +445,7 @@ static int ah_init_state(struct xfrm_state *x)
        }
 
        ahp->icv_full_len = aalg_desc->uinfo.auth.icv_fullbits/8;
-       ahp->icv_trunc_len = aalg_desc->uinfo.auth.icv_truncbits/8;
+       ahp->icv_trunc_len = x->aalg->alg_trunc_len/8;
 
        BUG_ON(ahp->icv_trunc_len > MAX_AH_AUTH_LEN);