Module Name: src
Committed By: martin
Date: Mon Dec 29 17:27:29 UTC 2014
Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSPosix [netbsd-7]:
mDNSPosix.c
src/external/bsd/dhcpcd/dist [netbsd-7]: dhcpcd.c
src/external/bsd/ipf/dist/lib [netbsd-7]: printhost.c printhostmask.c
printipfexpr.c save_v1trap.c save_v2trap.c
src/external/bsd/ipf/dist/tools [netbsd-7]: lexer.c
src/external/bsd/ppp/usr.sbin/pppd [netbsd-7]: sys-bsd.c
src/external/bsd/tcpdump/bin [netbsd-7]: Makefile
src/sbin/route [netbsd-7]: route.c
src/usr.sbin/lpr/common_source [netbsd-7]: Makefile common.c
Log Message:
Pull up following revision(s) (requested by prlw1 in ticket #358):
sbin/route/route.c: revision 1.149
external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c: revision 1.7
external/bsd/ipf/dist/lib/printhost.c: revision 1.3
usr.sbin/lpr/common_source/common.c: revision 1.43
usr.sbin/lpr/common_source/Makefile: revision 1.12
external/bsd/ipf/dist/lib/printhostmask.c: revision 1.3
external/bsd/ipf/dist/lib/save_v1trap.c: revision 1.2
external/bsd/dhcpcd/dist/dhcpcd.c: revision 1.21
external/bsd/tcpdump/bin/Makefile: revision 1.12
external/bsd/ipf/dist/lib/save_v2trap.c: revision 1.2
external/bsd/ipf/dist/tools/lexer.c: revision 1.2
external/bsd/ppp/usr.sbin/pppd/sys-bsd.c: revision 1.3
external/bsd/ipf/dist/lib/printipfexpr.c: revision 1.2
MKINET6=no build fixes
http://mail-index.netbsd.org/tech-net/2014/12/13/msg004898.html
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.4.1 \
src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c
cvs rdiff -u -r1.7.2.1 -r1.7.2.2 src/external/bsd/dhcpcd/dist/dhcpcd.c
cvs rdiff -u -r1.2 -r1.2.12.1 src/external/bsd/ipf/dist/lib/printhost.c \
src/external/bsd/ipf/dist/lib/printhostmask.c
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.12.1 \
src/external/bsd/ipf/dist/lib/printipfexpr.c \
src/external/bsd/ipf/dist/lib/save_v1trap.c \
src/external/bsd/ipf/dist/lib/save_v2trap.c
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.12.1 src/external/bsd/ipf/dist/tools/lexer.c
cvs rdiff -u -r1.1.6.1 -r1.1.6.2 src/external/bsd/ppp/usr.sbin/pppd/sys-bsd.c
cvs rdiff -u -r1.10 -r1.10.4.1 src/external/bsd/tcpdump/bin/Makefile
cvs rdiff -u -r1.144 -r1.144.4.1 src/sbin/route/route.c
cvs rdiff -u -r1.11 -r1.11.40.1 src/usr.sbin/lpr/common_source/Makefile
cvs rdiff -u -r1.42 -r1.42.4.1 src/usr.sbin/lpr/common_source/common.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c:1.6 src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c:1.6.4.1
--- src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c:1.6 Mon Mar 31 23:26:30 2014
+++ src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c Mon Dec 29 17:27:28 2014
@@ -718,7 +718,7 @@ mDNSlocal int SetupSocket(struct sockadd
err = setsockopt(*sktPtr, IPPROTO_IPV6, IPV6_RECVPKTINFO, &kOn, sizeof(kOn));
if (err < 0) { err = errno; perror("setsockopt - IPV6_RECVPKTINFO"); }
}
-#elif defined(IPV6_PKTINFO)
+ #elif defined(IPV6_PKTINFO)
if (err == 0)
{
err = setsockopt(*sktPtr, IPPROTO_IPV6, IPV6_PKTINFO, &kOn, sizeof(kOn));
Index: src/external/bsd/dhcpcd/dist/dhcpcd.c
diff -u src/external/bsd/dhcpcd/dist/dhcpcd.c:1.7.2.1 src/external/bsd/dhcpcd/dist/dhcpcd.c:1.7.2.2
--- src/external/bsd/dhcpcd/dist/dhcpcd.c:1.7.2.1 Mon Dec 29 16:18:05 2014
+++ src/external/bsd/dhcpcd/dist/dhcpcd.c Mon Dec 29 17:27:28 2014
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
- __RCSID("$NetBSD: dhcpcd.c,v 1.7.2.1 2014/12/29 16:18:05 martin Exp $");
+ __RCSID("$NetBSD: dhcpcd.c,v 1.7.2.2 2014/12/29 17:27:28 martin Exp $");
/*
* dhcpcd - DHCP client daemon
@@ -745,8 +745,9 @@ dhcpcd_startinterface(void *arg)
!(ifo->options & (DHCPCD_INFORM | DHCPCD_PFXDLGONLY)))
ipv6nd_startrs(ifp);
- if (ifo->options & DHCPCD_DHCP6)
+ if (ifo->options & DHCPCD_DHCP6) {
dhcp6_find_delegates(ifp);
+ }
if (!(ifo->options & DHCPCD_IPV6RS) ||
ifo->options & DHCPCD_IA_FORCED)
Index: src/external/bsd/ipf/dist/lib/printhost.c
diff -u src/external/bsd/ipf/dist/lib/printhost.c:1.2 src/external/bsd/ipf/dist/lib/printhost.c:1.2.12.1
--- src/external/bsd/ipf/dist/lib/printhost.c:1.2 Sun Jul 22 14:27:36 2012
+++ src/external/bsd/ipf/dist/lib/printhost.c Mon Dec 29 17:27:28 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: printhost.c,v 1.2 2012/07/22 14:27:36 darrenr Exp $ */
+/* $NetBSD: printhost.c,v 1.2.12.1 2014/12/29 17:27:28 martin Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -25,9 +25,9 @@ printhost(family, addr)
if ((family == -1) || !*addr)
PRINTF("any");
else {
+#ifdef USE_INET6
void *ptr = addr;
-#ifdef USE_INET6
PRINTF("%s", inet_ntop(family, ptr, ipbuf, sizeof(ipbuf)));
#else
ipa.s_addr = *addr;
Index: src/external/bsd/ipf/dist/lib/printhostmask.c
diff -u src/external/bsd/ipf/dist/lib/printhostmask.c:1.2 src/external/bsd/ipf/dist/lib/printhostmask.c:1.2.12.1
--- src/external/bsd/ipf/dist/lib/printhostmask.c:1.2 Sun Jul 22 14:27:36 2012
+++ src/external/bsd/ipf/dist/lib/printhostmask.c Mon Dec 29 17:27:28 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: printhostmask.c,v 1.2 2012/07/22 14:27:36 darrenr Exp $ */
+/* $NetBSD: printhostmask.c,v 1.2.12.1 2014/12/29 17:27:28 martin Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -25,9 +25,9 @@ printhostmask(family, addr, mask)
if ((family == -1) || ((!addr || !*addr) && (!mask || !*mask)))
PRINTF("any");
else {
+#ifdef USE_INET6
void *ptr = addr;
-#ifdef USE_INET6
PRINTF("%s", inet_ntop(family, ptr, ipbuf, sizeof(ipbuf)));
#else
ipa.s_addr = *addr;
Index: src/external/bsd/ipf/dist/lib/printipfexpr.c
diff -u src/external/bsd/ipf/dist/lib/printipfexpr.c:1.1.1.2 src/external/bsd/ipf/dist/lib/printipfexpr.c:1.1.1.2.12.1
--- src/external/bsd/ipf/dist/lib/printipfexpr.c:1.1.1.2 Sun Jul 22 13:44:41 2012
+++ src/external/bsd/ipf/dist/lib/printipfexpr.c Mon Dec 29 17:27:28 2014
@@ -1,11 +1,13 @@
-/* $NetBSD: printipfexpr.c,v 1.1.1.2 2012/07/22 13:44:41 darrenr Exp $ */
+/* $NetBSD: printipfexpr.c,v 1.1.1.2.12.1 2014/12/29 17:27:28 martin Exp $ */
#include "ipf.h"
static void printport __P((int *));
static void printhosts __P((int *));
static void printsingle __P((int *));
+#ifdef USE_INET6
static void printhostsv6 __P((int *));
+#endif
void
printipfexpr(array)
Index: src/external/bsd/ipf/dist/lib/save_v1trap.c
diff -u src/external/bsd/ipf/dist/lib/save_v1trap.c:1.1.1.2 src/external/bsd/ipf/dist/lib/save_v1trap.c:1.1.1.2.12.1
--- src/external/bsd/ipf/dist/lib/save_v1trap.c:1.1.1.2 Sun Jul 22 13:44:42 2012
+++ src/external/bsd/ipf/dist/lib/save_v1trap.c Mon Dec 29 17:27:28 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: save_v1trap.c,v 1.1.1.2 2012/07/22 13:44:42 darrenr Exp $ */
+/* $NetBSD: save_v1trap.c,v 1.1.1.2.12.1 2014/12/29 17:27:28 martin Exp $ */
#include "ipf.h"
#include "netinet/ipl.h"
@@ -180,7 +180,7 @@ snmpv1_parse(char **strings)
if (ctx->fd >= 0) {
ctx->sin.sin_family = AF_INET;
ctx->sin.sin_port = htons(162);
- if (connect(ctx->fd, &ctx->sin,
+ if (connect(ctx->fd, (struct sockaddr *)&ctx->sin,
sizeof(ctx->sin)) != 0) {
snmpv1_destroy(ctx);
return NULL;
Index: src/external/bsd/ipf/dist/lib/save_v2trap.c
diff -u src/external/bsd/ipf/dist/lib/save_v2trap.c:1.1.1.2 src/external/bsd/ipf/dist/lib/save_v2trap.c:1.1.1.2.12.1
--- src/external/bsd/ipf/dist/lib/save_v2trap.c:1.1.1.2 Sun Jul 22 13:44:43 2012
+++ src/external/bsd/ipf/dist/lib/save_v2trap.c Mon Dec 29 17:27:28 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: save_v2trap.c,v 1.1.1.2 2012/07/22 13:44:43 darrenr Exp $ */
+/* $NetBSD: save_v2trap.c,v 1.1.1.2.12.1 2014/12/29 17:27:28 martin Exp $ */
#include "ipf.h"
#include "netinet/ipl.h"
@@ -183,7 +183,7 @@ snmpv2_parse(char **strings)
if (ctx->fd >= 0) {
ctx->sin.sin_family = AF_INET;
ctx->sin.sin_port = htons(162);
- if (connect(ctx->fd, &ctx->sin,
+ if (connect(ctx->fd, (struct sockaddr *)&ctx->sin,
sizeof(ctx->sin)) != 0) {
snmpv2_destroy(ctx);
return NULL;
Index: src/external/bsd/ipf/dist/tools/lexer.c
diff -u src/external/bsd/ipf/dist/tools/lexer.c:1.1.1.2 src/external/bsd/ipf/dist/tools/lexer.c:1.1.1.2.12.1
--- src/external/bsd/ipf/dist/tools/lexer.c:1.1.1.2 Sun Jul 22 13:44:59 2012
+++ src/external/bsd/ipf/dist/tools/lexer.c Mon Dec 29 17:27:29 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: lexer.c,v 1.1.1.2 2012/07/22 13:44:59 darrenr Exp $ */
+/* $NetBSD: lexer.c,v 1.1.1.2.12.1 2014/12/29 17:27:29 martin Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -176,8 +176,10 @@ static char *yytexttostr(offset, max)
int yylex()
{
+#ifdef USE_INET6
static int prior = 0;
static int priornum = 0;
+#endif
int c, n, isbuilding, rval, lnext, nokey = 0;
char *name;
int triedv6 = 0;
@@ -239,7 +241,9 @@ nextchar:
if (lnext == 1) {
lnext = 0;
if ((isbuilding == 0) && !ISALNUM(c)) {
+#ifdef USE_INET6
prior = c;
+#endif
return c;
}
goto nextchar;
@@ -330,7 +334,9 @@ nextchar:
yytokentype = 0;
if (yydebug)
fprintf(stderr, "reset at EOF\n");
+#ifdef USE_INET6
prior = 0;
+#endif
return 0;
}
@@ -594,9 +600,11 @@ done:
yypos = 0;
}
+#ifdef USE_INET6
if (rval == YY_NUMBER)
priornum = yylval.num;
prior = rval;
+#endif
return rval;
}
Index: src/external/bsd/ppp/usr.sbin/pppd/sys-bsd.c
diff -u src/external/bsd/ppp/usr.sbin/pppd/sys-bsd.c:1.1.6.1 src/external/bsd/ppp/usr.sbin/pppd/sys-bsd.c:1.1.6.2
--- src/external/bsd/ppp/usr.sbin/pppd/sys-bsd.c:1.1.6.1 Wed Dec 17 19:25:40 2014
+++ src/external/bsd/ppp/usr.sbin/pppd/sys-bsd.c Mon Dec 29 17:27:29 2014
@@ -189,7 +189,9 @@ static fd_set in_fds; /* set of fds tha
static int max_in_fd; /* highest fd set in in_fds */
static int if_is_up; /* the interface is currently up */
+#ifdef INET6
static int if6_is_up; /* the interface is currently up */
+#endif /* INET6 */
static u_int32_t ifaddrs[2]; /* local and remote addresses we set */
static u_int32_t default_route_gateway; /* gateway addr for default route */
static u_int32_t proxy_arp_addr; /* remote addr for proxy arp */
Index: src/external/bsd/tcpdump/bin/Makefile
diff -u src/external/bsd/tcpdump/bin/Makefile:1.10 src/external/bsd/tcpdump/bin/Makefile:1.10.4.1
--- src/external/bsd/tcpdump/bin/Makefile:1.10 Tue Dec 31 17:33:11 2013
+++ src/external/bsd/tcpdump/bin/Makefile Mon Dec 29 17:27:29 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2013/12/31 17:33:11 christos Exp $
+# $NetBSD: Makefile,v 1.10.4.1 2014/12/29 17:27:29 martin Exp $
WARNS?= 1 # XXX: need to cleanup later
@@ -33,7 +33,6 @@ print-arp.c \
print-ascii.c \
print-atalk.c \
print-atm.c \
-print-babel.c \
print-beep.c \
print-bfd.c \
print-bgp.c \
@@ -167,7 +166,7 @@ CPPFLAGS+=-DWITH_USER=\"_tcpdump\"
CPPFLAGS+=-DWITH_CHROOT=\"/var/chroot/tcpdump\"
.if (${USE_INET6} != "no")
-SRCS+= print-ip6.c print-ip6opts.c print-icmp6.c \
+SRCS+= print-babel.c print-ip6.c print-ip6opts.c print-icmp6.c \
print-rt6.c print-dhcp6.c print-ospf6.c
CPPFLAGS+=-DINET6=1 -DHAVE_RES_USE_INET6=1
Index: src/sbin/route/route.c
diff -u src/sbin/route/route.c:1.144 src/sbin/route/route.c:1.144.4.1
--- src/sbin/route/route.c:1.144 Sat Oct 19 15:59:15 2013
+++ src/sbin/route/route.c Mon Dec 29 17:27:28 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.144 2013/10/19 15:59:15 christos Exp $ */
+/* $NetBSD: route.c,v 1.144.4.1 2014/12/29 17:27:28 martin Exp $ */
/*
* Copyright (c) 1983, 1989, 1991, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
#if 0
static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: route.c,v 1.144 2013/10/19 15:59:15 christos Exp $");
+__RCSID("$NetBSD: route.c,v 1.144.4.1 2014/12/29 17:27:28 martin Exp $");
#endif
#endif /* not lint */
@@ -1393,8 +1393,10 @@ addtag(sup su, const char *s, int where)
int
prefixlen(const char *s, struct sou *soup)
{
- int len = atoi(s), q, r;
- int max;
+ int max, len = atoi(s);
+#ifdef INET6
+ int q, r;
+#endif
switch (af) {
case AF_INET:
@@ -1414,8 +1416,10 @@ prefixlen(const char *s, struct sou *sou
if (len < -1 || len > max)
errx(EXIT_FAILURE, "%s: bad value", s);
+#ifdef INET6
q = len >> 3;
r = len & 7;
+#endif
switch (af) {
case AF_INET:
memset(soup->so_mask, 0, sizeof(*soup->so_mask));
Index: src/usr.sbin/lpr/common_source/Makefile
diff -u src/usr.sbin/lpr/common_source/Makefile:1.11 src/usr.sbin/lpr/common_source/Makefile:1.11.40.1
--- src/usr.sbin/lpr/common_source/Makefile:1.11 Sat May 3 14:48:32 2008
+++ src/usr.sbin/lpr/common_source/Makefile Mon Dec 29 17:27:28 2014
@@ -1,8 +1,14 @@
-# $NetBSD: Makefile,v 1.11 2008/05/03 14:48:32 lukem Exp $
+# $NetBSD: Makefile,v 1.11.40.1 2014/12/29 17:27:28 martin Exp $
+
+.include <bsd.own.mk>
LIBISPRIVATE= yes
LIB= common
SRCS= common.c common_vars.c displayq.c fatal.c rmjob.c startdaemon.c
+.if (${USE_INET6} != "no")
+CPPFLAGS.common.c= -DINET6
+.endif
+
.include <bsd.lib.mk>
Index: src/usr.sbin/lpr/common_source/common.c
diff -u src/usr.sbin/lpr/common_source/common.c:1.42 src/usr.sbin/lpr/common_source/common.c:1.42.4.1
--- src/usr.sbin/lpr/common_source/common.c:1.42 Wed Nov 13 21:19:17 2013
+++ src/usr.sbin/lpr/common_source/common.c Mon Dec 29 17:27:28 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: common.c,v 1.42 2013/11/13 21:19:17 christos Exp $ */
+/* $NetBSD: common.c,v 1.42.4.1 2014/12/29 17:27:28 martin Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)common.c 8.5 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: common.c,v 1.42 2013/11/13 21:19:17 christos Exp $");
+__RCSID("$NetBSD: common.c,v 1.42.4.1 2014/12/29 17:27:28 martin Exp $");
#endif
#endif /* not lint */
@@ -350,13 +350,15 @@ compar(const void *p1, const void *p2)
const char *
checkremote(void)
{
- char lname[NI_MAXHOST], rname[NI_MAXHOST];
- struct addrinfo hints, *res, *res0;
+ struct addrinfo hints, *res0;
static char errbuf[128];
int error;
- struct ifaddrs *ifap, *ifa;
+ struct ifaddrs *ifap;
+#if defined(INET6) && defined(__KAME__)
+ char lname[NI_MAXHOST], rname[NI_MAXHOST];
+ struct addrinfo *res;
+ struct ifaddrs *ifa;
const int niflags = NI_NUMERICHOST;
-#ifdef __KAME__
struct sockaddr_in6 sin6;
struct sockaddr_in6 *sin6p;
#endif
@@ -379,7 +381,6 @@ checkremote(void)
hints.ai_flags = AI_CANONNAME;
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
- res = NULL;
error = getaddrinfo(gethost(RM), NULL, &hints, &res0);
if (error) {
(void)snprintf(errbuf, sizeof(errbuf),
@@ -391,6 +392,7 @@ checkremote(void)
remote = 1; /* assume printer is remote */
+#if defined(INET6) && defined(__KAME__)
for (res = res0; res; res = res->ai_next) {
if (getnameinfo(res->ai_addr, res->ai_addrlen,
rname, sizeof(rname), NULL, 0, niflags) != 0)
@@ -412,6 +414,7 @@ checkremote(void)
}
}
done:
+#endif
freeaddrinfo(res0);
freeifaddrs(ifap);
return NULL;