Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libipsec protect SADB_X_EXT_TAG with #ifdef
details: https://anonhg.NetBSD.org/src/rev/2e440d4a04e3
branches: trunk
changeset: 550943:2e440d4a04e3
user: itojun <itojun%NetBSD.org@localhost>
date: Tue Aug 26 03:49:05 2003 +0000
description:
protect SADB_X_EXT_TAG with #ifdef
diffstat:
lib/libipsec/pfkey.c | 8 +++++---
lib/libipsec/pfkey_dump.c | 14 ++++++++------
2 files changed, 13 insertions(+), 9 deletions(-)
diffs (91 lines):
diff -r 587517d7444c -r 2e440d4a04e3 lib/libipsec/pfkey.c
--- a/lib/libipsec/pfkey.c Tue Aug 26 03:37:25 2003 +0000
+++ b/lib/libipsec/pfkey.c Tue Aug 26 03:49:05 2003 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: pfkey.c,v 1.17 2003/08/26 03:37:25 itojun Exp $ */
-/* $KAME: pfkey.c,v 1.43 2003/06/27 07:09:00 itojun Exp $ */
+/* $NetBSD: pfkey.c,v 1.18 2003/08/26 03:49:05 itojun Exp $ */
+/* $KAME: pfkey.c,v 1.46 2003/08/26 03:37:06 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pfkey.c,v 1.17 2003/08/26 03:37:25 itojun Exp $");
+__RCSID("$NetBSD: pfkey.c,v 1.18 2003/08/26 03:49:05 itojun Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -1765,7 +1765,9 @@
case SADB_EXT_SPIRANGE:
case SADB_X_EXT_POLICY:
case SADB_X_EXT_SA2:
+#ifdef SADB_X_EXT_TAG
case SADB_X_EXT_TAG:
+#endif
mhp[ext->sadb_ext_type] = (caddr_t)ext;
break;
default:
diff -r 587517d7444c -r 2e440d4a04e3 lib/libipsec/pfkey_dump.c
--- a/lib/libipsec/pfkey_dump.c Tue Aug 26 03:37:25 2003 +0000
+++ b/lib/libipsec/pfkey_dump.c Tue Aug 26 03:49:05 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pfkey_dump.c,v 1.15 2003/08/26 03:37:25 itojun Exp $ */
+/* $NetBSD: pfkey_dump.c,v 1.16 2003/08/26 03:49:05 itojun Exp $ */
/* $KAME: pfkey_dump.c,v 1.44 2003/07/25 09:35:28 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pfkey_dump.c,v 1.15 2003/08/26 03:37:25 itojun Exp $");
+__RCSID("$NetBSD: pfkey_dump.c,v 1.16 2003/08/26 03:49:05 itojun Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -326,7 +326,9 @@
char pbuf[NI_MAXSERV];
caddr_t mhp[SADB_EXT_MAX + 1];
struct sadb_address *m_saddr, *m_daddr;
+#ifdef SADB_X_EXT_TAG
struct sadb_x_tag *m_tag;
+#endif
struct sadb_x_policy *m_xpl;
struct sadb_lifetime *m_lftc = NULL, *m_lfth = NULL;
struct sockaddr *sa;
@@ -344,7 +346,9 @@
m_saddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_SRC];
m_daddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_DST];
+#ifdef SADB_X_EXT_TAG
m_tag = (struct sadb_x_tag *)mhp[SADB_X_EXT_TAG];
+#endif
m_xpl = (struct sadb_x_policy *)mhp[SADB_X_EXT_POLICY];
m_lftc = (struct sadb_lifetime *)mhp[SADB_EXT_LIFETIME_CURRENT];
m_lfth = (struct sadb_lifetime *)mhp[SADB_EXT_LIFETIME_HARD];
@@ -399,8 +403,10 @@
str_upperspec(m_saddr->sadb_address_proto, sport, dport);
}
+#ifdef SADB_X_EXT_TAG
if (m_tag)
printf("tagged \"%s\" ", m_tag->sadb_x_tag_name);
+#endif
/* policy */
{
@@ -451,11 +457,7 @@
struct sockaddr *sa;
{
static char buf[NI_MAXHOST];
-#ifdef NI_WITHSCOPEID
- const int niflag = NI_NUMERICHOST | NI_WITHSCOPEID;
-#else
const int niflag = NI_NUMERICHOST;
-#endif
if (sa == NULL)
return "";
Home |
Main Index |
Thread Index |
Old Index