On Wed, May 14, 2014 at 07:55:44PM +0200, J??r??mie Courr??ges-Anglas wrote:
>
> Redirecting this to tech@
>
> Consus has confirmed this fixed his "issue". I plan to commit it this
> week-end if I hear no objection.
>
> [email protected] (J??r??mie Courr??ges-Anglas) writes:
>
> > Thanks for the detailed report.
> >
> > This diff makes rtadvd aware of route info messages on the listening
> > side, no functional change except that the error message goes away.
> > We just ignore the message since in that case there's no good reason to
> > try to validate the more specifics advertized by other routers.
> >
> > ok?
OK bluhm@
>
> Index: rtadvd.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/rtadvd/rtadvd.c,v
> retrieving revision 1.45
> diff -u -p -r1.45 rtadvd.c
> --- rtadvd.c 5 May 2013 14:25:52 -0000 1.45
> +++ rtadvd.c 6 May 2014 14:21:42 -0000
> @@ -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_adver
> 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
> }
>
> 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
> 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 */
>
> --
> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
>