diff options
author | 2006-12-15 06:12:03 +0000 | |
---|---|---|
committer | 2006-12-15 06:12:03 +0000 | |
commit | 149d5bbd7402a2ac55813da0c6d1216a8a3dbfce (patch) | |
tree | b09b434671d8c70e3aeac2e0b708c28d292c2143 | |
parent | reduce RFC2292/3542 #ifdefs. (diff) | |
download | wireguard-openbsd-149d5bbd7402a2ac55813da0c6d1216a8a3dbfce.tar.xz wireguard-openbsd-149d5bbd7402a2ac55813da0c6d1216a8a3dbfce.zip |
cleanup RFC2292/3542 #ifdef.
-rw-r--r-- | usr.sbin/rtsold/rtsol.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/usr.sbin/rtsold/rtsol.c b/usr.sbin/rtsold/rtsol.c index a280f653f39..7710d37c40a 100644 --- a/usr.sbin/rtsold/rtsol.c +++ b/usr.sbin/rtsold/rtsol.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsol.c,v 1.10 2003/10/05 15:29:28 deraadt Exp $ */ +/* $OpenBSD: rtsol.c,v 1.11 2006/12/15 06:12:03 itojun Exp $ */ /* $KAME: rtsol.c,v 1.15 2002/05/31 10:10:03 itojun Exp $ */ /* @@ -106,39 +106,21 @@ sockopen(void) /* specify to tell receiving interface */ on = 1; -#ifdef IPV6_RECVPKTINFO if (setsockopt(rssock, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on)) < 0) { warnmsg(LOG_ERR, __func__, "IPV6_RECVPKTINFO: %s", strerror(errno)); exit(1); } -#else /* old adv. API */ - if (setsockopt(rssock, IPPROTO_IPV6, IPV6_PKTINFO, &on, - sizeof(on)) < 0) { - warnmsg(LOG_ERR, __func__, "IPV6_PKTINFO: %s", - strerror(errno)); - exit(1); - } -#endif on = 1; /* specify to tell value of hoplimit field of received IP6 hdr */ -#ifdef IPV6_RECVHOPLIMIT if (setsockopt(rssock, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &on, sizeof(on)) < 0) { warnmsg(LOG_ERR, __func__, "IPV6_RECVHOPLIMIT: %s", strerror(errno)); exit(1); } -#else /* old adv. API */ - if (setsockopt(rssock, IPPROTO_IPV6, IPV6_HOPLIMIT, &on, - sizeof(on)) < 0) { - warnmsg(LOG_ERR, __func__, "IPV6_HOPLIMIT: %s", - strerror(errno)); - exit(1); - } -#endif /* specfiy to accept only router advertisements on the socket */ ICMP6_FILTER_SETBLOCKALL(&filt); |