I'd like to remove unused/NULL arguments from nd6_nud_hint() in order to get rid of a nd6_lookup().
Ok? Index: netinet/tcp_input.c =================================================================== RCS file: /cvs/src/sys/netinet/tcp_input.c,v retrieving revision 1.293 diff -u -p -r1.293 tcp_input.c --- netinet/tcp_input.c 16 Jun 2015 11:09:40 -0000 1.293 +++ netinet/tcp_input.c 8 Jul 2015 08:59:08 -0000 @@ -146,7 +146,7 @@ struct timeval tcp_ackdrop_ppslim_last; do { \ if (tp && tp->t_inpcb && (tp->t_inpcb->inp_flags & INP_IPV6) && \ tp->t_inpcb->inp_route6.ro_rt) { \ - nd6_nud_hint(tp->t_inpcb->inp_route6.ro_rt, NULL, 0, \ + nd6_nud_hint(tp->t_inpcb->inp_route6.ro_rt, \ tp->t_inpcb->inp_rtableid); \ } \ } while (0) Index: netinet6/nd6.c =================================================================== RCS file: /cvs/src/sys/netinet6/nd6.c,v retrieving revision 1.139 diff -u -p -r1.139 nd6.c --- netinet6/nd6.c 16 Jun 2015 11:09:40 -0000 1.139 +++ netinet6/nd6.c 8 Jul 2015 08:59:08 -0000 @@ -891,20 +891,12 @@ nd6_free(struct rtentry *rt, int gc) * XXX cost-effective methods? */ void -nd6_nud_hint(struct rtentry *rt, struct in6_addr *dst6, int force, - u_int rtableid) +nd6_nud_hint(struct rtentry *rt, u_int rtableid) { struct llinfo_nd6 *ln; - /* - * If the caller specified "rt", use that. Otherwise, resolve the - * routing table by supplied "dst6". - */ - if (!rt) { - if (!dst6) - return; - if (!(rt = nd6_lookup(dst6, 0, NULL, rtableid))) - return; + if (rt == NULL) { + return; } if ((rt->rt_flags & RTF_GATEWAY) != 0 || @@ -923,11 +915,9 @@ nd6_nud_hint(struct rtentry *rt, struct * if we get upper-layer reachability confirmation many times, * it is possible we have false information. */ - if (!force) { - ln->ln_byhint++; - if (ln->ln_byhint > nd6_maxnudhint) - return; - } + ln->ln_byhint++; + if (ln->ln_byhint > nd6_maxnudhint) + return; ln->ln_state = ND6_LLINFO_REACHABLE; if (!ND6_LLINFO_PERMANENT(ln)) { Index: netinet6/nd6.h =================================================================== RCS file: /cvs/src/sys/netinet6/nd6.h,v retrieving revision 1.41 diff -u -p -r1.41 nd6.h --- netinet6/nd6.h 20 Nov 2014 13:54:24 -0000 1.41 +++ netinet6/nd6.h 8 Jul 2015 08:59:08 -0000 @@ -276,7 +276,7 @@ void nd6_setmtu(struct ifnet *); void nd6_llinfo_settimer(struct llinfo_nd6 *, long); void nd6_timer(void *); void nd6_purge(struct ifnet *); -void nd6_nud_hint(struct rtentry *, struct in6_addr *, int, u_int); +void nd6_nud_hint(struct rtentry *, u_int); int nd6_resolve(struct ifnet *, struct rtentry *, struct mbuf *, struct sockaddr *, u_char *); void nd6_rtrequest(int, struct rtentry *);