Two minor errors: one at compile time and one
at execution time. The latter affects only
FreeBSD to my knowledge.


Regards,

Mats
From 9d8e1423020c87ab9c3e7dff5b6c4c9f3c25d9e0 Mon Sep 17 00:00:00 2001
From: Mats Erik Andersson <[email protected]>
Date: Wed, 3 Nov 2010 09:28:03 +0100
Subject: [PATCH 1/2] Make interface flag IFF_NOTRAILERS conditional.

---
 ChangeLog        |    5 +++++
 ifconfig/flags.c |    2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f757a82..74ece86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-03  Mats Erik Andersson <[email protected]>
+
+	* ifconfig/flags.c (flag_char_tab): Protect the uses of
+	IFF_NOTRAILERS by `#ifdef'.
+
 2010-10-31  Mats Erik Andersson <[email protected]>
 
 	* ifconfig/if_index.c (if_nametoindex, if_freenameindex)
diff --git a/ifconfig/flags.c b/ifconfig/flags.c
index 279b295..a4138df 100644
--- a/ifconfig/flags.c
+++ b/ifconfig/flags.c
@@ -398,7 +398,9 @@ static struct if_flag_char flag_char_tab[] = {
   { IFF_DYNAMIC,     'd' },
 #endif
   { IFF_PROMISC,     'P' },
+#ifdef IFF_NOTRAILERS
   { IFF_NOTRAILERS,  'N' },
+#endif
   { IFF_NOARP,       'O' },
   { IFF_POINTOPOINT, 'P' },
 #ifdef IFF_SLAVE
-- 
1.7.1

From 77fdbe116be59ff111119ab23b62db90bcfa534e Mon Sep 17 00:00:00 2001
From: Mats Erik Andersson <[email protected]>
Date: Wed, 3 Nov 2010 09:34:17 +0100
Subject: [PATCH 2/2] src/inetd.c: Further conditions on AI_V4MAPPED.

---
 ChangeLog   |    5 +++++
 src/inetd.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 74ece86..e73b81c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-11-03  Mats Erik Andersson <[email protected]>
 
+	* src/inetd.c (inetd_getaddrinfo): Do not use AI_V4MAPPED with
+	address family AF_INET.  FreeBSD fails otherwise.
+
+2010-11-03  Mats Erik Andersson <[email protected]>
+
 	* ifconfig/flags.c (flag_char_tab): Protect the uses of
 	IFF_NOTRAILERS by `#ifdef'.
 
diff --git a/src/inetd.c b/src/inetd.c
index f5f7d32..ce7592e 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -743,7 +743,7 @@ inetd_getaddrinfo (struct servtab *sep, int proto, struct addrinfo **result)
 
   hints.ai_flags = AI_PASSIVE;
 #ifdef AI_V4MAPPED
-  if (sep->se_v4mapped)
+  if (sep->se_v4mapped && (sep->se_family != AF_INET))
     hints.ai_flags |= AI_V4MAPPED;
 #endif
   hints.ai_family = sep->se_family;
-- 
1.7.1

Attachment: signature.asc
Description: Digital signature

Reply via email to