Skip to contentSkip to conversation

: Probe selected algorithm only - 2.6.11-rc3 IPSEC problem

XFRM Andy 1 participant 1 message Feb 5, 2005

lore
Share & tools
lore

Andy

author
#0 lore 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.

Signature · 1 line
Andy <[email protected]>