[lkml]   [2003]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: ipsec-tools 0.1 + kernel 2.5.64
Christoph Hellwig <> writes:

> On Wed, Mar 05, 2003 at 01:43:30PM -0500, Derek Atkins wrote:
> > Well, the problem is that the replacement function is only valid on
> > Linux, so I need to have the <OS> test in there anyways.
> It's probably not valid on Linux but on OSes that support the functionality
> you use to implement it. It might e.g. work on the Hurd that uses old
> Linux networking code.

I find it extremely unlikely that the hurd would have the include file
<linux/rtnetlink.h>, which is part of the code chunk in question. As
I said, the code is extremely linux-specific.

> Checking for OSes is wrong because you couldn't care less for the
> OS, you care for the functionality that is provided. This is the
> nice idea behind autoconf (the implementation of autoconf is a completly
> different issue, though).

As I said, the current code is OS specific. I find is EXTREMELY
unlikely it would work on anything that isn't Linux. I wont argue
about autoconf implementation.

However, I will acknowledge that my original patch was broken. Here
is a better one. This should work on both pre- and post- glibc-2.3
linux systems.


diff -u -r1.3 -r1.4
--- src/racoon/grabmyaddr.c 3 Mar 2003 23:56:56 -0000 1.3
+++ src/racoon/grabmyaddr.c 5 Mar 2003 18:54:08 -0000 1.4
@@ -65,8 +65,9 @@
#include "isakmp_var.h"
#include "gcmalloc.h"

-#ifdef __linux__
+#if defined(__linux__) && !defined(HAVE_GETIFADDRS)

@@ -78,7 +79,7 @@
static int suitable_ifaddr6 __P((const char *, const struct sockaddr *));

-#ifdef __linux__

/* We could do this _much_ better. kame racoon in its current form
* will esentially die at frequent changes of address configuration.
Derek Atkins
Computer and Internet Security Consultant
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [W:0.046 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site