From: jca Date: Thu, 15 May 2014 05:03:24 +0000 (+0000) Subject: Deal with - actually, ignore - route info messages on the listening side. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f1b3b3459128e7f4636a97e50b2ba4facc799e6b;p=openbsd Deal with - actually, ignore - route info messages on the listening side. Issue reported by consus at gmx dot com on bugs@. ok bluhm@ --- diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c index 1a6ac5df5b7..9e1c200c249 100644 --- a/usr.sbin/rtadvd/rtadvd.c +++ b/usr.sbin/rtadvd/rtadvd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtadvd.c,v 1.45 2013/05/05 14:25:52 dtucker Exp $ */ +/* $OpenBSD: rtadvd.c,v 1.46 2014/05/15 05:03:24 jca Exp $ */ /* $KAME: rtadvd.c,v 1.66 2002/05/29 14:18:36 itojun Exp $ */ /* @@ -121,6 +121,7 @@ union nd_opts { #define NDOPT_FLAG_MTU (1 << 4) #define NDOPT_FLAG_RDNSS (1 << 5) #define NDOPT_FLAG_DNSSL (1 << 6) +#define NDOPT_FLAG_ROUTE_INFO (1 << 7) u_int32_t ndopt_flags[] = { [ND_OPT_SOURCE_LINKADDR] = NDOPT_FLAG_SRCLINKADDR, @@ -128,6 +129,7 @@ u_int32_t ndopt_flags[] = { [ND_OPT_PREFIX_INFORMATION] = NDOPT_FLAG_PREFIXINFO, [ND_OPT_REDIRECTED_HEADER] = NDOPT_FLAG_RDHDR, [ND_OPT_MTU] = NDOPT_FLAG_MTU, + [ND_OPT_ROUTE_INFO] = NDOPT_FLAG_ROUTE_INFO, [ND_OPT_RDNSS] = NDOPT_FLAG_RDNSS, [ND_OPT_DNSSL] = NDOPT_FLAG_DNSSL, }; @@ -809,7 +811,8 @@ ra_input(int len, struct nd_router_advert *ra, if (nd6_options((struct nd_opt_hdr *)(ra + 1), len - sizeof(struct nd_router_advert), &ndopts, NDOPT_FLAG_SRCLINKADDR | NDOPT_FLAG_PREFIXINFO - | NDOPT_FLAG_MTU | NDOPT_FLAG_RDNSS | NDOPT_FLAG_DNSSL)) { + | NDOPT_FLAG_MTU | NDOPT_FLAG_ROUTE_INFO + | NDOPT_FLAG_RDNSS | NDOPT_FLAG_DNSSL)) { log_warnx("ND option check failed for an RA from %s on %s", inet_ntop(AF_INET6, &from->sin6_addr, ntopbuf, INET6_ADDRSTRLEN), @@ -1109,6 +1112,7 @@ nd6_options(struct nd_opt_hdr *hdr, int limit, } if (hdr->nd_opt_type > ND_OPT_MTU && + hdr->nd_opt_type != ND_OPT_ROUTE_INFO && hdr->nd_opt_type != ND_OPT_RDNSS && hdr->nd_opt_type != ND_OPT_DNSSL) { @@ -1142,6 +1146,7 @@ nd6_options(struct nd_opt_hdr *hdr, int limit, case ND_OPT_SOURCE_LINKADDR: case ND_OPT_TARGET_LINKADDR: case ND_OPT_REDIRECTED_HEADER: + case ND_OPT_ROUTE_INFO: case ND_OPT_RDNSS: case ND_OPT_DNSSL: break; /* we don't care about these options */