23 lines
872 B
Diff
23 lines
872 B
Diff
Index: sys/netinet6/nd6_rtr.c
|
|
===================================================================
|
|
--- sys/netinet6/nd6_rtr.c (revision 280920)
|
|
+++ sys/netinet6/nd6_rtr.c (working copy)
|
|
@@ -296,8 +296,16 @@ nd6_ra_input(struct mbuf *m, int off, int icmp6len
|
|
}
|
|
if (nd_ra->nd_ra_retransmit)
|
|
ndi->retrans = ntohl(nd_ra->nd_ra_retransmit);
|
|
- if (nd_ra->nd_ra_curhoplimit)
|
|
- ndi->chlim = nd_ra->nd_ra_curhoplimit;
|
|
+ if (nd_ra->nd_ra_curhoplimit) {
|
|
+ if (ndi->chlim < nd_ra->nd_ra_curhoplimit)
|
|
+ ndi->chlim = nd_ra->nd_ra_curhoplimit;
|
|
+ else if (ndi->chlim != nd_ra->nd_ra_curhoplimit) {
|
|
+ log(LOG_ERR, "RA with a lower CurHopLimit sent from "
|
|
+ "%s on %s (current = %d, received = %d). "
|
|
+ "Ignored.\n", ip6_sprintf(ip6bufs, &ip6->ip6_src),
|
|
+ if_name(ifp), ndi->chlim, nd_ra->nd_ra_curhoplimit);
|
|
+ }
|
|
+ }
|
|
dr = defrtrlist_update(&dr0);
|
|
}
|
|
|