]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/ipv6/esp6.c
Merge branch 'for-4.0' of git://linux-nfs.org/~bfields/linux
[karo-tx-linux.git] / net / ipv6 / esp6.c
index 83fc3a385a26782c316914c4f8aafab78fe1a5e2..e48f2c7c5c596b0a364636b7ed6d6e693e9e925f 100644 (file)
@@ -286,8 +286,8 @@ static int esp_input_done2(struct sk_buff *skb, int err)
        err = -EINVAL;
        padlen = nexthdr[0];
        if (padlen + 2 + alen >= elen) {
-               LIMIT_NETDEBUG(KERN_WARNING "ipsec esp packet is garbage "
-                              "padlen=%d, elen=%d\n", padlen + 2, elen - alen);
+               net_dbg_ratelimited("ipsec esp packet is garbage padlen=%d, elen=%d\n",
+                                   padlen + 2, elen - alen);
                goto out;
        }
 
@@ -345,7 +345,8 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
                goto out;
        }
 
-       if ((nfrags = skb_cow_data(skb, 0, &trailer)) < 0) {
+       nfrags = skb_cow_data(skb, 0, &trailer);
+       if (nfrags < 0) {
                ret = -EINVAL;
                goto out;
        }
@@ -544,12 +545,12 @@ static int esp_init_authenc(struct xfrm_state *x)
                BUG_ON(!aalg_desc);
 
                err = -EINVAL;
-               if (aalg_desc->uinfo.auth.icv_fullbits/8 !=
+               if (aalg_desc->uinfo.auth.icv_fullbits / 8 !=
                    crypto_aead_authsize(aead)) {
-                       NETDEBUG(KERN_INFO "ESP: %s digestsize %u != %hu\n",
-                                x->aalg->alg_name,
-                                crypto_aead_authsize(aead),
-                                aalg_desc->uinfo.auth.icv_fullbits/8);
+                       pr_info("ESP: %s digestsize %u != %hu\n",
+                               x->aalg->alg_name,
+                               crypto_aead_authsize(aead),
+                               aalg_desc->uinfo.auth.icv_fullbits / 8);
                        goto free_key;
                }