Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/usr.sbin/lpr/lpd Pull up revision 1.43 (via patch) (req...
details: https://anonhg.NetBSD.org/src/rev/7d51cfea0885
branches: netbsd-1-6
changeset: 529136:7d51cfea0885
user: lukem <lukem%NetBSD.org@localhost>
date: Wed Oct 02 03:35:07 2002 +0000
description:
Pull up revision 1.43 (via patch) (requested by itojun in ticket #857):
set IPV6_V6ONLY socket option for AF_INET6 socket, to avoid
complicated access control issue due to IPv4 mapped address.
diffstat:
usr.sbin/lpr/lpd/lpd.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r 469af336d824 -r 7d51cfea0885 usr.sbin/lpr/lpd/lpd.c
--- a/usr.sbin/lpr/lpd/lpd.c Wed Oct 02 03:14:31 2002 +0000
+++ b/usr.sbin/lpr/lpd/lpd.c Wed Oct 02 03:35:07 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lpd.c,v 1.33 2002/01/21 14:42:29 wiz Exp $ */
+/* $NetBSD: lpd.c,v 1.33.2.1 2002/10/02 03:35:07 lukem Exp $ */
/*
* Copyright (c) 1983, 1993, 1994
@@ -45,7 +45,7 @@
#if 0
static char sccsid[] = "@(#)lpd.c 8.7 (Berkeley) 5/10/95";
#else
-__RCSID("$NetBSD: lpd.c,v 1.33 2002/01/21 14:42:29 wiz Exp $");
+__RCSID("$NetBSD: lpd.c,v 1.33.2.1 2002/10/02 03:35:07 lukem Exp $");
#endif
#endif /* not lint */
@@ -761,6 +761,13 @@
close (*s);
continue;
}
+ if (r->ai_family == AF_INET6 && setsockopt(*s,
+ IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) < 0) {
+ syslog(LOG_ERR,
+ "setsockopt (IPV6_V6ONLY): %m");
+ close(*s);
+ continue;
+ }
if (bind(*s, r->ai_addr, r->ai_addrlen) < 0) {
syslog(LOG_DEBUG, "bind(): %m");
close (*s);
Home |
Main Index |
Thread Index |
Old Index