Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Mar 2012 19:01:51 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/165692: nd6_nud_hint() a NOP due to removal of route caching
Message-ID:  <201203041901.q24J1pEv009737@red.freebsd.org>
Resent-Message-ID: <201203041910.q24JAARu010675@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         165692
>Category:       kern
>Synopsis:       nd6_nud_hint() a NOP due to removal of route caching
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-bugs
>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:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203041901.q24J1pEv009737>