Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/rtadvd rtadvd: remove support for SIOCSIFINFO_IN6



details:   https://anonhg.NetBSD.org/src/rev/90834fb43804
branches:  trunk
changeset: 460944:90834fb43804
user:      roy <roy%NetBSD.org@localhost>
date:      Sun Nov 10 21:32:38 2019 +0000

description:
rtadvd: remove support for SIOCSIFINFO_IN6

It's been broken since we enabled dropping privs.
It's also probably the wrong place to do this, and support for
SIOCSIFINFO_IN6 will be in the next dhcpcd import.

diffstat:

 usr.sbin/rtadvd/config.c |  30 +-----------------------------
 1 files changed, 1 insertions(+), 29 deletions(-)

diffs (44 lines):

diff -r 0edf1ce90372 -r 90834fb43804 usr.sbin/rtadvd/config.c
--- a/usr.sbin/rtadvd/config.c  Sun Nov 10 21:16:21 2019 +0000
+++ b/usr.sbin/rtadvd/config.c  Sun Nov 10 21:32:38 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: config.c,v 1.41 2019/06/14 09:06:45 roy Exp $  */
+/*     $NetBSD: config.c,v 1.42 2019/11/10 21:32:38 roy Exp $  */
 /*     $KAME: config.c,v 1.93 2005/10/17 14:40:02 suz Exp $    */
 
 /*
@@ -507,34 +507,6 @@
                goto errexit;
        }
 
-#ifdef SIOCSIFINFO_IN6
-       {
-               struct in6_ndireq ndi;
-               int s;
-
-               if ((s = prog_socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
-                       logit(LOG_ERR, "<%s> socket: %m", __func__);
-                       goto errexit;
-               }
-               memset(&ndi, 0, sizeof(ndi));
-               strncpy(ndi.ifname, intface, IFNAMSIZ);
-               if (prog_ioctl(s, SIOCGIFINFO_IN6, &ndi) < 0) {
-                       logit(LOG_INFO, "<%s> ioctl:SIOCGIFINFO_IN6 at %s: %m",
-                            __func__, intface);
-               }
-
-               /* reflect the RA info to the host variables in kernel */
-               ndi.ndi.chlim = tmp->hoplimit;
-               ndi.ndi.retrans = tmp->retranstimer;
-               ndi.ndi.basereachable = tmp->reachabletime;
-               if (prog_ioctl(s, SIOCSIFINFO_IN6, &ndi) < 0) {
-                       logit(LOG_INFO, "<%s> ioctl:SIOCSIFINFO_IN6 at %s: %m",
-                            __func__, intface);
-               }
-               prog_close(s);
-       }
-#endif
-
        /* route information */
        for (i = -1; i < MAXROUTE; i++) {
                struct rtinfo *rti;



Home | Main Index | Thread Index | Old Index