Author: markj Date: Thu May 5 23:06:39 2016 New Revision: 299145 URL: https://svnweb.freebsd.org/changeset/base/299145
Log: MFC r295583, r295584, r295729, r295730: NDP code cleanup changes. MFC r295732: Fix an IPv6 DAD reference count leak. Modified: stable/10/sys/netinet6/nd6.c stable/10/sys/netinet6/nd6.h stable/10/sys/netinet6/nd6_nbr.c stable/10/sys/netinet6/nd6_rtr.c stable/10/sys/netinet6/scope6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/nd6.c ============================================================================== --- stable/10/sys/netinet6/nd6.c Thu May 5 22:40:07 2016 (r299144) +++ stable/10/sys/netinet6/nd6.c Thu May 5 23:06:39 2016 (r299145) @@ -2215,7 +2215,7 @@ nd6_sysctl_drlist(SYSCTL_HANDLER_ARGS) error = sa6_recoverscope(&d.rtaddr); if (error != 0) return (error); - d.flags = dr->flags; + d.flags = dr->raflags; d.rtlifetime = dr->rtlifetime; d.expire = dr->expire + (time_second - time_uptime); d.if_index = dr->ifp->if_index; Modified: stable/10/sys/netinet6/nd6.h ============================================================================== --- stable/10/sys/netinet6/nd6.h Thu May 5 22:40:07 2016 (r299144) +++ stable/10/sys/netinet6/nd6.h Thu May 5 23:06:39 2016 (r299145) @@ -235,13 +235,13 @@ struct in6_ndifreq { ((MAX_RANDOM_FACTOR - MIN_RANDOM_FACTOR) * (x >> 10)))) /1000) TAILQ_HEAD(nd_drhead, nd_defrouter); -struct nd_defrouter { +struct nd_defrouter { TAILQ_ENTRY(nd_defrouter) dr_entry; - struct in6_addr rtaddr; - u_char flags; /* flags on RA message */ + struct in6_addr rtaddr; + u_char raflags; /* flags on RA message */ u_short rtlifetime; u_long expire; - struct ifnet *ifp; + struct ifnet *ifp; int installed; /* is installed into kernel routing table */ }; @@ -445,7 +445,6 @@ void nd6_dad_stop(struct ifaddr *); /* nd6_rtr.c */ void nd6_rs_input(struct mbuf *, int, int); void nd6_ra_input(struct mbuf *, int, int); -void prelist_del(struct nd_prefix *); void defrouter_reset(void); void defrouter_select(void); void defrtrlist_del(struct nd_defrouter *); Modified: stable/10/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/10/sys/netinet6/nd6_nbr.c Thu May 5 22:40:07 2016 (r299144) +++ stable/10/sys/netinet6/nd6_nbr.c Thu May 5 23:06:39 2016 (r299145) @@ -1315,9 +1315,10 @@ nd6_dad_start(struct ifaddr *ifa, int de } if ((dp = nd6_dad_find(ifa, NULL)) != NULL) { /* - * DAD already in progress. Let the existing entry - * to finish it. + * DAD is already in progress. Let the existing entry + * finish it. */ + nd6_dad_rele(dp); return; } Modified: stable/10/sys/netinet6/nd6_rtr.c ============================================================================== --- stable/10/sys/netinet6/nd6_rtr.c Thu May 5 22:40:07 2016 (r299144) +++ stable/10/sys/netinet6/nd6_rtr.c Thu May 5 23:06:39 2016 (r299145) @@ -270,7 +270,7 @@ nd6_ra_input(struct mbuf *m, int off, in bzero(&dr0, sizeof(dr0)); dr0.rtaddr = saddr6; - dr0.flags = nd_ra->nd_ra_flags_reserved; + dr0.raflags = nd_ra->nd_ra_flags_reserved; /* * Effectively-disable routes from RA messages when * ND6_IFF_NO_RADR enabled on the receiving interface or @@ -708,7 +708,7 @@ defrouter_select(void) static int rtpref(struct nd_defrouter *dr) { - switch (dr->flags & ND_RA_FLAG_RTPREF_MASK) { + switch (dr->raflags & ND_RA_FLAG_RTPREF_MASK) { case ND_RA_FLAG_RTPREF_HIGH: return (RTPREF_HIGH); case ND_RA_FLAG_RTPREF_MEDIUM: @@ -722,7 +722,7 @@ rtpref(struct nd_defrouter *dr) * serious bug of kernel internal. We thus always bark here. * Or, can we even panic? */ - log(LOG_ERR, "rtpref: impossible RA flag %x\n", dr->flags); + log(LOG_ERR, "rtpref: impossible RA flag %x\n", dr->raflags); return (RTPREF_INVALID); } /* NOTREACHED */ @@ -744,7 +744,7 @@ defrtrlist_update(struct nd_defrouter *n oldpref = rtpref(dr); /* override */ - dr->flags = new->flags; /* xxx flag check */ + dr->raflags = new->raflags; /* XXX flag check */ dr->rtlifetime = new->rtlifetime; dr->expire = new->expire; @@ -937,9 +937,9 @@ prelist_remove(struct nd_prefix *pr) /* unlink ndpr_entry from nd_prefix list */ LIST_REMOVE(pr, ndpr_entry); - /* free list of routers that adversed the prefix */ + /* free list of routers that advertised the prefix */ LIST_FOREACH_SAFE(pfr, &pr->ndpr_advrtrs, pfr_entry, next) { - free(pfr, M_IP6NDP); + pfxrtr_del(pfr); } free(pr, M_IP6NDP); Modified: stable/10/sys/netinet6/scope6.c ============================================================================== --- stable/10/sys/netinet6/scope6.c Thu May 5 22:40:07 2016 (r299144) +++ stable/10/sys/netinet6/scope6.c Thu May 5 23:06:39 2016 (r299145) @@ -416,7 +416,7 @@ sa6_recoverscope(struct sockaddr_in6 *si zoneid != sin6->sin6_scope_id) { log(LOG_NOTICE, "%s: embedded scope mismatch: %s%%%d. " - "sin6_scope_id was overridden.", __func__, + "sin6_scope_id was overridden\n", __func__, ip6_sprintf(ip6buf, &sin6->sin6_addr), sin6->sin6_scope_id); } _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"