Module Name: src Committed By: roy Date: Tue Apr 21 12:05:54 UTC 2020
Modified Files: src/usr.sbin/rtadvd: Makefile rtadvd.8 rtadvd.c Removed Files: src/usr.sbin/rtadvd: rrenum.c rrenum.h Log Message: rtadvd: Remove router renumbering - it's been disable for years To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/rtadvd/Makefile cvs rdiff -u -r1.21 -r0 src/usr.sbin/rtadvd/rrenum.c cvs rdiff -u -r1.6 -r0 src/usr.sbin/rtadvd/rrenum.h cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/rtadvd/rtadvd.8 cvs rdiff -u -r1.71 -r1.72 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/Makefile diff -u src/usr.sbin/rtadvd/Makefile:1.23 src/usr.sbin/rtadvd/Makefile:1.24 --- src/usr.sbin/rtadvd/Makefile:1.23 Sun Oct 13 07:28:21 2019 +++ src/usr.sbin/rtadvd/Makefile Tue Apr 21 12:05:54 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2019/10/13 07:28:21 mrg Exp $ +# $NetBSD: Makefile,v 1.24 2020/04/21 12:05:54 roy Exp $ WARNS?= 4 @@ -7,7 +7,7 @@ WARNS?= 4 USE_FORT?= yes # network server RUMPPRG= rtadvd -SRCS= rtadvd.c rrenum.c advcap.c if.c config.c timer.c dump.c +SRCS= rtadvd.c advcap.c if.c config.c timer.c dump.c MAN= rtadvd.8 rtadvd.conf.5 CPPFLAGS+= -DINET6 Index: src/usr.sbin/rtadvd/rtadvd.8 diff -u src/usr.sbin/rtadvd/rtadvd.8:1.27 src/usr.sbin/rtadvd/rtadvd.8:1.28 --- src/usr.sbin/rtadvd/rtadvd.8:1.27 Mon Nov 11 13:42:49 2019 +++ src/usr.sbin/rtadvd/rtadvd.8 Tue Apr 21 12:05:54 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: rtadvd.8,v 1.27 2019/11/11 13:42:49 roy Exp $ +.\" $NetBSD: rtadvd.8,v 1.28 2020/04/21 12:05:54 roy Exp $ .\" $KAME: rtadvd.8,v 1.24 2002/05/31 16:16:08 jinmei Exp $ .\" .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 11, 2019 +.Dd April 21, 2020 .Dt RTADVD 8 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd router advertisement daemon .Sh SYNOPSIS .Nm -.Op Fl CDdfRs +.Op Fl CDdfs .Op Fl c Ar configfile .Op Fl M Ar ifname .Op Fl p Ar pidfile @@ -137,15 +137,6 @@ Repeating this option, adds more verbose .It Fl f Foreground mode (useful when debugging). Log messages will be dumped to stderr when this option is specified. -.It Fl M Ar ifname -Specify an interface to join the all-routers site-local multicast group. -By default, -.Nm -tries to join the first advertising interface appearing on the command -line. -This option has meaning only with the -.Fl R -option, which enables routing renumbering protocol support. .\".It Fl m .\"Enables mobile IPv6 support. .\"This changes the content of router advertisement option, as well as @@ -157,17 +148,6 @@ for the PID file. By default, .Pa /var/run/rtadvd.pid is used. -.It Fl R -Accept router renumbering requests. -If you enable it, an -.Xr ipsec 4 -setup is suggested for security reasons. -.\"On KAME-based systems, -.\".Xr rrenumd 8 -.\"generates router renumbering request packets. -This option is currently disabled, and is ignored by -.Nm -with a warning message. .It Fl s Do not add or delete prefixes dynamically. Only statically configured prefixes, if any, will be advertised. Index: src/usr.sbin/rtadvd/rtadvd.c diff -u src/usr.sbin/rtadvd/rtadvd.c:1.71 src/usr.sbin/rtadvd/rtadvd.c:1.72 --- src/usr.sbin/rtadvd/rtadvd.c:1.71 Mon Nov 11 13:42:49 2019 +++ src/usr.sbin/rtadvd/rtadvd.c Tue Apr 21 12:05:54 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rtadvd.c,v 1.71 2019/11/11 13:42:49 roy Exp $ */ +/* $NetBSD: rtadvd.c,v 1.72 2020/04/21 12:05:54 roy Exp $ */ /* $KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $ */ /* @@ -62,7 +62,6 @@ #include <pwd.h> #include "rtadvd.h" -#include "rrenum.h" #include "advcap.h" #include "timer.h" #include "if.h" @@ -85,10 +84,8 @@ struct iovec rcviov[2]; struct iovec sndiov[2]; struct sockaddr_in6 rcvfrom; static const char *dumpfilename = "/var/run/rtadvd.dump"; /* XXX configurable */ -static char *mcastif; int sock; int rtsock = -1; -int accept_rr = 0; int Cflag = 0, dflag = 0, sflag = 0, Dflag; static char **if_argv; @@ -187,7 +184,7 @@ main(int argc, char *argv[]) pid_t pid; /* get command line options and arguments */ -#define OPTIONS "c:dDfM:p:Rs" +#define OPTIONS "c:dDfM:p:s" while ((ch = getopt(argc, argv, OPTIONS)) != -1) { #undef OPTIONS switch (ch) { @@ -206,18 +203,9 @@ main(int argc, char *argv[]) case 'f': fflag = 1; break; - case 'M': - mcastif = optarg; - break; case 'p': pidfilepath = optarg; break; - case 'R': - fprintf(stderr, "rtadvd: " - "the -R option is currently ignored.\n"); - /* accept_rr = 1; */ - /* run anyway... */ - break; case 's': sflag = 1; break; @@ -889,16 +877,6 @@ rtadvd_input(void) } ra_input(i, (struct nd_router_advert *)icp, pi, &rcvfrom); break; - case ICMP6_ROUTER_RENUMBERING: - if (accept_rr == 0) { - logit(LOG_ERR, "%s: received a router renumbering " - "message, but not allowed to be accepted", - __func__); - break; - } - rr_input(i, (struct icmp6_router_renum *)icp, pi, &rcvfrom, - &dst); - break; default: /* * Note that this case is POSSIBLE, especially just @@ -1572,8 +1550,6 @@ sock_open(void) ICMP6_FILTER_SETBLOCKALL(&filt); ICMP6_FILTER_SETPASS(ND_ROUTER_SOLICIT, &filt); ICMP6_FILTER_SETPASS(ND_ROUTER_ADVERT, &filt); - if (accept_rr) - ICMP6_FILTER_SETPASS(ICMP6_ROUTER_RENUMBERING, &filt); if (prog_setsockopt(sock, IPPROTO_ICMPV6, ICMP6_FILTER, &filt, sizeof(filt)) == -1) { logit(LOG_ERR, "%s: IICMP6_FILTER: %m", __func__); @@ -1600,39 +1576,6 @@ sock_open(void) } } - /* - * When attending router renumbering, join all-routers site-local - * multicast group. - */ - if (accept_rr) { - if (inet_pton(AF_INET6, ALLROUTERS_SITE, - mreq.ipv6mr_multiaddr.s6_addr) != 1) - { - logit(LOG_ERR, "%s: inet_pton failed(library bug?)", - __func__); - exit(EXIT_FAILURE); - } - ra = TAILQ_FIRST(&ralist); - if (mcastif) { - if ((mreq.ipv6mr_interface = if_nametoindex(mcastif)) - == 0) { - logit(LOG_ERR, - "%s: invalid interface: %s", - __func__, mcastif); - exit(EXIT_FAILURE); - } - } else - mreq.ipv6mr_interface = ra->ifindex; - if (prog_setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, - &mreq, sizeof(mreq)) == -1) { - logit(LOG_ERR, - "%s: IPV6_JOIN_GROUP(site) on %s: %m", - __func__, - mcastif ? mcastif : ra->ifname); - exit(EXIT_FAILURE); - } - } - /* initialize msghdr for receiving packets */ rcviov[0].iov_base = answer; rcviov[0].iov_len = sizeof(answer);