From nobody@FreeBSD.org  Sun Mar  4 19:01:51 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C411F106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  4 Mar 2012 19:01:51 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id AFD268FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  4 Mar 2012 19:01:51 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q24J1pLN009738
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 4 Mar 2012 19:01:51 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q24J1pEv009737;
	Sun, 4 Mar 2012 19:01:51 GMT
	(envelope-from nobody)
Message-Id: <201203041901.q24J1pEv009737@red.freebsd.org>
Date: Sun, 4 Mar 2012 19:01:51 GMT
From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: nd6_nud_hint() a NOP due to removal of route caching
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         165692
>Category:       kern
>Synopsis:       nd6_nud_hint() a NOP due to removal of route caching
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    gnn
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 04 19:10:10 UTC 2012
>Closed-Date:    
>Last-Modified:  Sun May 18 04:59:24 UTC 2014
>Originator:     Bjoern A. Zeeb
>Release:        10-CURRENT
>Organization:
>Environment:
>Description:
When removing route caching from the pcbs nd6_nud_hint() was called with two NULL pointers for rt and dst6 (and has probably only been called with rt before).  Since the code in nd6_nud_hint() was changed as well and the entire function calls are now effectively NOPs as all mandatory options are missing.
>How-To-Repeat:
Index: sys/netinet/tcp_input.c
===================================================================
--- sys/netinet/tcp_input.c	(revision 232512)
+++ sys/netinet/tcp_input.c	(working copy)
@@ -457,6 +457,7 @@ tcp_signature_verify_input(struct mbuf *m, int off
 
 /* Neighbor Discovery, Neighbor Unreachability Detection Upper layer hint. */
 #ifdef INET6
+/* XXX-BZ useless without rt and dst6. Fix route chaching removal. */
 #define ND6_HINT(tp) \
 do { \
 	if ((tp) && (tp)->t_inpcb && \
Index: sys/netinet/tcp_var.h
===================================================================
--- sys/netinet/tcp_var.h	(revision 232512)
+++ sys/netinet/tcp_var.h	(working copy)
@@ -85,6 +85,7 @@ struct tcptemp {
 
 /* Neighbor Discovery, Neighbor Unreachability Detection Upper layer hint. */
 #ifdef INET6
+/* XXX-BZ useless without rt and dst6. Fix route chaching removal. */
 #define ND6_HINT(tp)						\
 do {								\
 	if ((tp) && (tp)->t_inpcb &&				\
Index: sys/netinet6/nd6.c
===================================================================
--- sys/netinet6/nd6.c	(revision 232514)
+++ sys/netinet6/nd6.c	(working copy)
@@ -1136,6 +1136,8 @@ nd6_nud_hint(struct rtentry *rt, struct in6_addr *
 	if ((dst6 == NULL) || (rt == NULL))
 		return;
 
+	/* NOTREACHED. XXX-BZ Fix route chaching removal. */
+
 	ifp = rt->rt_ifp;
 	IF_AFDATA_LOCK(ifp);
 	ln = nd6_lookup(dst6, ND6_EXCLUSIVE, NULL);

>Fix:
Once PCB route caching is back cann nd6_nud_hint() with proper arguments again.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->bz 
Responsible-Changed-By: bz 
Responsible-Changed-When: Sun Mar 4 19:28:20 UTC 2012 
Responsible-Changed-Why:  
Claim; it's my own and it's to remind me to fix it once the 
infrastructure will be back to do so. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=165692 
Responsible-Changed-From-To: bz->gnn 
Responsible-Changed-By: bz 
Responsible-Changed-When: Sun May 18 04:59:12 UTC 2014 
Responsible-Changed-Why:  
I shall not use bugzilla (at least until we will have a CLI). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=165692 
>Unformatted:
