Module Name:    src
Committed By:   roy
Date:           Fri Apr 20 11:31:54 UTC 2018

Modified Files:
        src/usr.sbin/rtadvd: rtadvd.c

Log Message:
Insist on newer socket options.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/usr.sbin/rtadvd/rtadvd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/rtadvd/rtadvd.c
diff -u src/usr.sbin/rtadvd/rtadvd.c:1.63 src/usr.sbin/rtadvd/rtadvd.c:1.64
--- src/usr.sbin/rtadvd/rtadvd.c:1.63	Fri Apr 20 11:25:39 2018
+++ src/usr.sbin/rtadvd/rtadvd.c	Fri Apr 20 11:31:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtadvd.c,v 1.63 2018/04/20 11:25:39 roy Exp $	*/
+/*	$NetBSD: rtadvd.c,v 1.64 2018/04/20 11:31:54 roy Exp $	*/
 /*	$KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $	*/
 
 /*
@@ -1525,35 +1525,19 @@ sock_open(void)
 
 	/* specify to tell receiving interface */
 	on = 1;
-#ifdef IPV6_RECVPKTINFO
 	if (prog_setsockopt(sock, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on,
 		       sizeof(on)) == -1) {
 		logit(LOG_ERR, "%s: IPV6_RECVPKTINFO: %m", __func__);
 		exit(EXIT_FAILURE);
 	}
-#else  /* old adv. API */
-	if (prog_setsockopt(sock, IPPROTO_IPV6, IPV6_PKTINFO, &on,
-		       sizeof(on)) == -1) {
-		logit(LOG_ERR, "%s: IPV6_PKTINFO: %m", __func__);
-		exit(EXIT_FAILURE);
-	}
-#endif
 
 	on = 1;
 	/* specify to tell value of hoplimit field of received IP6 hdr */
-#ifdef IPV6_RECVHOPLIMIT
 	if (prog_setsockopt(sock, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &on,
 		       sizeof(on)) == -1) {
 		logit(LOG_ERR, "%s: IPV6_RECVHOPLIMIT: %m", __func__);
 		exit(EXIT_FAILURE);
 	}
-#else  /* old adv. API */
-	if (prog_setsockopt(sock, IPPROTO_IPV6, IPV6_HOPLIMIT, &on,
-		       sizeof(on)) == -1) {
-		logit(LOG_ERR, "%s: IPV6_HOPLIMIT: %m", __func__);
-		exit(EXIT_FAILURE);
-	}
-#endif
 
 	ICMP6_FILTER_SETBLOCKALL(&filt);
 	ICMP6_FILTER_SETPASS(ND_ROUTER_SOLICIT, &filt);

Reply via email to