Module Name:    src
Committed By:   ozaki-r
Date:           Wed Jul 15 09:20:18 UTC 2015

Modified Files:
        src/sys/netinet: tcp_input.c
        src/sys/netinet6: nd6.c nd6.h

Log Message:
Remove unused arguments and the associated code from nd6_nud_hint()

from OpenBSD


To generate a diff of this commit:
cvs rdiff -u -r1.341 -r1.342 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.163 -r1.164 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.64 -r1.65 src/sys/netinet6/nd6.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.341 src/sys/netinet/tcp_input.c:1.342
--- src/sys/netinet/tcp_input.c:1.341	Sun May 24 15:43:45 2015
+++ src/sys/netinet/tcp_input.c	Wed Jul 15 09:20:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.341 2015/05/24 15:43:45 rtr Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.342 2015/07/15 09:20:18 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.341 2015/05/24 15:43:45 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.342 2015/07/15 09:20:18 ozaki-r Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -264,7 +264,7 @@ nd6_hint(struct tcpcb *tp)
 
 	if (tp != NULL && tp->t_in6pcb != NULL && tp->t_family == AF_INET6 &&
 	    (rt = rtcache_validate(&tp->t_in6pcb->in6p_route)) != NULL)
-		nd6_nud_hint(rt, NULL, 0);
+		nd6_nud_hint(rt);
 }
 #else
 static inline void

Index: src/sys/netinet6/nd6.c
diff -u src/sys/netinet6/nd6.c:1.163 src/sys/netinet6/nd6.c:1.164
--- src/sys/netinet6/nd6.c:1.163	Tue Jun 30 08:31:42 2015
+++ src/sys/netinet6/nd6.c	Wed Jul 15 09:20:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.c,v 1.163 2015/06/30 08:31:42 ozaki-r Exp $	*/
+/*	$NetBSD: nd6.c,v 1.164 2015/07/15 09:20:18 ozaki-r Exp $	*/
 /*	$KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.163 2015/06/30 08:31:42 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.164 2015/07/15 09:20:18 ozaki-r Exp $");
 
 #include "opt_net_mpsafe.h"
 
@@ -1165,20 +1165,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)
+nd6_nud_hint(struct rtentry *rt)
 {
 	struct llinfo_nd6 *ln;
 
-	/*
-	 * If the caller specified "rt", use that.  Otherwise, resolve the
-	 * routing table by supplied "dst6".
-	 */
-	if (rt == NULL) {
-		if (dst6 == NULL)
-			return;
-		if ((rt = nd6_lookup(dst6, 0, NULL)) == NULL)
-			return;
-	}
+	if (rt == NULL)
+		return;
 
 	if ((rt->rt_flags & RTF_GATEWAY) != 0 ||
 	    (rt->rt_flags & RTF_LLINFO) == 0 ||
@@ -1196,11 +1188,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: src/sys/netinet6/nd6.h
diff -u src/sys/netinet6/nd6.h:1.64 src/sys/netinet6/nd6.h:1.65
--- src/sys/netinet6/nd6.h:1.64	Wed Feb 25 12:45:34 2015
+++ src/sys/netinet6/nd6.h	Wed Jul 15 09:20:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.h,v 1.64 2015/02/25 12:45:34 roy Exp $	*/
+/*	$NetBSD: nd6.h,v 1.65 2015/07/15 09:20:18 ozaki-r Exp $	*/
 /*	$KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $	*/
 
 /*
@@ -417,7 +417,7 @@ void nd6_setmtu(struct ifnet *);
 void nd6_llinfo_settimer(struct llinfo_nd6 *, long);
 void nd6_timer(void *);
 void nd6_purge(struct ifnet *, struct in6_ifextra *);
-void nd6_nud_hint(struct rtentry *, struct in6_addr *, int);
+void nd6_nud_hint(struct rtentry *);
 int nd6_resolve(struct ifnet *, struct rtentry *,
 	struct mbuf *, struct sockaddr *, u_char *);
 void nd6_rtrequest(int, struct rtentry *, const struct rt_addrinfo *);

Reply via email to