From: Derek Atkins <derek@ihtfp.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Kostadin Karaivanov <larry@minfin.bg>, linux-kernel@vger.kernel.org
Subject: Re: ipsec-tools 0.1 + kernel 2.5.64
Date: 05 Mar 2003 14:00:47 -0500 [thread overview]
Message-ID: <sjm7kbdvdsw.fsf@kikki.mit.edu> (raw)
In-Reply-To: <20030305185149.A28243@infradead.org>
Christoph Hellwig <hch@infradead.org> 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.
-derek
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)
#define HAVE_GETIFADDRS
+#define NEED_LINUX_GETIFADDRS
#endif
#ifndef HAVE_GETIFADDRS
@@ -78,7 +79,7 @@
static int suitable_ifaddr6 __P((const char *, const struct sockaddr *));
#endif
-#ifdef __linux__
+#ifdef NEED_LINUX_GETIFADDRS
/* 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
derek@ihtfp.com www.ihtfp.com
next prev parent reply other threads:[~2003-03-05 18:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-05 18:15 ipsec-tools 0.1 + kernel 2.5.64 Derek Atkins
2003-03-05 18:27 ` Christoph Hellwig
2003-03-05 18:43 ` Derek Atkins
2003-03-05 18:51 ` Christoph Hellwig
2003-03-05 19:00 ` Derek Atkins [this message]
2003-03-05 19:55 ` Derek Atkins
-- strict thread matches above, loose matches on Subject: below --
2003-03-05 11:49 Kostadin Karaivanov
2003-03-05 16:05 ` Kostadin Karaivanov
2003-03-05 11:29 Andreas Jellinghaus
2003-03-05 11:28 ` bert hubert
2003-03-05 14:52 ` Derek Atkins
2003-03-05 21:28 ` Andreas Jellinghaus
2003-03-05 12:47 ` James Morris
2003-03-05 19:33 ` Andreas Jellinghaus
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=sjm7kbdvdsw.fsf@kikki.mit.edu \
--to=derek@ihtfp.com \
--cc=hch@infradead.org \
--cc=larry@minfin.bg \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.