summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2006-12-15 06:14:08 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2006-12-15 06:14:08 +0000
commitb1dcc8fe3d733690f29e189dd700c05f0ecc73d8 (patch)
tree1b24bd1b17f5c02fa37bc4d9dfcddc6d7cd501d9
parentffdb001e0c2137a1282b219f6e46f4baea0d84e8 (diff)
reduce RFC2292/3542 #ifdef.
-rw-r--r--usr.sbin/rtadvd/rtadvd.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c
index c338f1126f7..3b3053b9c67 100644
--- a/usr.sbin/rtadvd/rtadvd.c
+++ b/usr.sbin/rtadvd/rtadvd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtadvd.c,v 1.26 2005/10/27 18:26:13 jmc Exp $ */
+/* $OpenBSD: rtadvd.c,v 1.27 2006/12/15 06:14:07 itojun Exp $ */
/* $KAME: rtadvd.c,v 1.66 2002/05/29 14:18:36 itojun Exp $ */
/*
@@ -1333,39 +1333,21 @@ sock_open()
/* specify to tell receiving interface */
on = 1;
-#ifdef IPV6_RECVPKTINFO
if (setsockopt(sock, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on,
sizeof(on)) < 0) {
syslog(LOG_ERR, "<%s> IPV6_RECVPKTINFO: %s",
__func__, strerror(errno));
exit(1);
}
-#else /* old adv. API */
- if (setsockopt(sock, IPPROTO_IPV6, IPV6_PKTINFO, &on,
- sizeof(on)) < 0) {
- syslog(LOG_ERR, "<%s> IPV6_PKTINFO: %s",
- __func__, strerror(errno));
- exit(1);
- }
-#endif
on = 1;
/* specify to tell value of hoplimit field of received IP6 hdr */
-#ifdef IPV6_RECVHOPLIMIT
if (setsockopt(sock, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &on,
sizeof(on)) < 0) {
syslog(LOG_ERR, "<%s> IPV6_RECVHOPLIMIT: %s",
__func__, strerror(errno));
exit(1);
}
-#else /* old adv. API */
- if (setsockopt(sock, IPPROTO_IPV6, IPV6_HOPLIMIT, &on,
- sizeof(on)) < 0) {
- syslog(LOG_ERR, "<%s> IPV6_HOPLIMIT: %s",
- __func__, strerror(errno));
- exit(1);
- }
-#endif
ICMP6_FILTER_SETBLOCKALL(&filt);
ICMP6_FILTER_SETPASS(ND_ROUTER_SOLICIT, &filt);