Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Fix build without INET6
details: https://anonhg.NetBSD.org/src/rev/5a77e955bab0
branches: trunk
changeset: 353063:5a77e955bab0
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Wed Apr 19 03:23:06 2017 +0000
description:
Fix build without INET6
diffstat:
sys/netinet/ip_carp.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (45 lines):
diff -r 13fb830a2190 -r 5a77e955bab0 sys/netinet/ip_carp.c
--- a/sys/netinet/ip_carp.c Wed Apr 19 02:21:53 2017 +0000
+++ b/sys/netinet/ip_carp.c Wed Apr 19 03:23:06 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_carp.c,v 1.86 2017/03/14 09:03:08 ozaki-r Exp $ */
+/* $NetBSD: ip_carp.c,v 1.87 2017/04/19 03:23:06 ozaki-r Exp $ */
/* $OpenBSD: ip_carp.c,v 1.113 2005/11/04 08:11:54 mcbride Exp $ */
/*
@@ -33,7 +33,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.86 2017/03/14 09:03:08 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.87 2017/04/19 03:23:06 ozaki-r Exp $");
/*
* TODO:
@@ -712,9 +712,11 @@
/* verify the hash */
if (carp_hmac_verify(sc, ch->carp_counter, ch->carp_md)) {
struct ip *ip;
+ char ipbuf[INET_ADDRSTRLEN];
+#ifdef INET6
struct ip6_hdr *ip6;
char ip6buf[INET6_ADDRSTRLEN];
- char ipbuf[INET_ADDRSTRLEN];
+#endif
CARP_STATINC(CARP_STAT_BADAUTH);
sc->sc_if.if_ierrors++;
@@ -726,11 +728,13 @@
in_fmtaddr(ipbuf, ip->ip_src)));
break;
+#ifdef INET6
case AF_INET6:
ip6 = mtod(m, struct ip6_hdr *);
CARP_LOG(sc, ("incorrect hash from %s",
IN6_PRINT(ip6buf, &ip6->ip6_src)));
break;
+#endif
default: CARP_LOG(sc, ("incorrect hash"));
break;
Home |
Main Index |
Thread Index |
Old Index