xfrm: Fix xfrm_state_find() wrt. wildcard source address.
[safe/jmp/linux-2.6] / net / xfrm / xfrm_algo.c
index 6cc1525..96036cf 100644 (file)
@@ -129,8 +129,7 @@ static struct xfrm_algo_desc aead_list[] = {
 
 static struct xfrm_algo_desc aalg_list[] = {
 {
-       .name = "hmac(digest_null)",
-       .compat = "digest_null",
+       .name = "digest_null",
 
        .uinfo = {
                .auth = {
@@ -201,8 +200,8 @@ static struct xfrm_algo_desc aalg_list[] = {
        }
 },
 {
-       .name = "hmac(ripemd160)",
-       .compat = "ripemd160",
+       .name = "hmac(rmd160)",
+       .compat = "rmd160",
 
        .uinfo = {
                .auth = {
@@ -399,6 +398,23 @@ static struct xfrm_algo_desc ealg_list[] = {
                .sadb_alg_maxbits = 256
        }
 },
+{
+       .name = "rfc3686(ctr(aes))",
+
+       .uinfo = {
+               .encr = {
+                       .blockbits = 128,
+                       .defkeybits = 160, /* 128-bit key + 32-bit nonce */
+               }
+       },
+
+       .desc = {
+               .sadb_alg_id = SADB_X_EALG_AESCTR,
+               .sadb_alg_ivlen = 8,
+               .sadb_alg_minbits = 128,
+               .sadb_alg_maxbits = 256
+       }
+},
 };
 
 static struct xfrm_algo_desc calg_list[] = {
@@ -702,7 +718,7 @@ int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *desc,
        for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
                int end;
 
-               BUG_TRAP(start <= offset + len);
+               WARN_ON(start > offset + len);
 
                end = start + skb_shinfo(skb)->frags[i].size;
                if ((copy = end - offset) > 0) {
@@ -732,7 +748,7 @@ int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *desc,
                for (; list; list = list->next) {
                        int end;
 
-                       BUG_TRAP(start <= offset + len);
+                       WARN_ON(start > offset + len);
 
                        end = start + list->len;
                        if ((copy = end - offset) > 0) {