mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy <andy@globalnetit.com>
To: herbert@gondor.apana.org.au
Cc: jmorris@redhat.com, davem@davemloft.net, linux-kernel@vger.kernel.org
Subject: [XFRM]: Probe selected algorithm only - 2.6.11-rc3 IPSEC problem
Date: Sat, 05 Feb 2005 01:11:04 -0500	[thread overview]
Message-ID: <1107583865.9597.357.camel@dell.tranquilitynj.net> (raw)

Using 2.6.11-rc3 with Openswan, no IPSEC SA can be established. Kernel
logs "kernel: ESP: md5 digestsize 16 != 0" and netlink returns an error.

The changes to XFRM in 2.6.11-rc3 have an error in xfrm_algo.c such that
xfrm_aalg_get_byname() always returns digest_null (which would indeed
have a zero length digest...)

The problem is here:

$ diff -Naur net/xfrm/xfrm_algo.c*
--- net/xfrm/xfrm_algo.c        2005-02-04 18:05:53.000000000 -0500
+++ net/xfrm/xfrm_algo.c~       2005-02-04 08:08:16.000000000 -0500
@@ -357,7 +357,7 @@
                return NULL;
 
        for (i = 0; i < entries; i++) {
-               if (strcmp(name, list[i].name) != 0)
+               if (!strcmp(name, list[i].name))
                        continue;
 
                if (list[i].available)


where the sense of (!strcmp()) is reversed. It's easier to read by
explicitly comparing to zero, IMHO, as I did in this patch.



-- 
Andy <andy@globalnetit.com>


                 reply	other threads:[~2005-02-05  6:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1107583865.9597.357.camel@dell.tranquilitynj.net \
    --to=andy@globalnetit.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=jmorris@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®