diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2014-05-15 05:03:25 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2014-05-15 05:03:25 +0000 |
commit | d579d3c1f6f4dc9d5e8a077e7b7db8c0e033fa93 (patch) | |
tree | 458ff3da9dcc0d7f4cc7f662d5a9c9244b9373a3 /usr.sbin/rtadvd | |
parent | e585f950212ed9ffeee53e2347613802f041481b (diff) |
Deal with - actually, ignore - route info messages on the listening side.
Issue reported by consus at gmx dot com on bugs@.
ok bluhm@
Diffstat (limited to 'usr.sbin/rtadvd')
-rw-r--r-- | usr.sbin/rtadvd/rtadvd.c | 9 |
1 files changed, 7 insertions, 2 deletions
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 */ |