NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/43137: should be pass 'rt->rt_gateway' and 'rt->rt_flags' to 'rtrequest(RTM_DELETE, ...)', which is in nd6_free() @sys/netinet6/nd6.c



>Number:         43137
>Category:       kern
>Synopsis:       should be pass 'rt->rt_gateway' and 'rt->rt_flags' to 
>'rtrequest(RTM_DELETE, ...)', which is in nd6_free() @sys/netinet6/nd6.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 08 06:40:01 +0000 2010
>Originator:     YAMAMOTO, Shigeru
>Release:        NetBSD 5.0.2
>Organization:
Internet Initiative Japan Inc.
>Environment:
NetBSD triton.iij.ad.jp 5.0.2 NetBSD 5.0.2 (GENERIC) #0: Sat Feb  6 17:53:27 
UTC 2010  
builds%b7.netbsd.org@localhost:/home/builds/ab/netbsd-5-0-2-RELEASE/i386/201002061851Z-obj/home/builds/ab/netbsd-5-0-2-RELEASE/src/sys/arch/i386/compile/GENERIC
 i386

>Description:
in nd6_free()@sys/netinet6/nd6.c, 'rtrequest()' is called without gateway/flags.

 rtrequest(RTM_DELETE, rt_getkey(rt), NULL, rt_mask(rt), 0, NULL);

in icmp6_mtudisc_timeout()@sys/netinet6/icmp6.c, 'rtrequest()' is called with 
gateway/flags.

 rtrequest((int) RTM_DELETE, rt_getkey(rt),
                    rt->rt_gateway, rt_mask(rt), rt->rt_flags, 0);

I think, rtrequest() in nd6_free() shoudl be called with gateway/flags, same as 
icmp6_mtudisc_timeout().

>How-To-Repeat:

>Fix:
I make a patch for -current.

------------------------------------------------------------------------
Index: sys/netinet6/nd6.c
===================================================================
RCS file: /share/cvsup/NetBSD/src/sys/netinet6/nd6.c,v
retrieving revision 1.135
diff -u -r1.135 nd6.c
--- sys/netinet6/nd6.c  6 Nov 2009 20:41:22 -0000       1.135
+++ sys/netinet6/nd6.c  8 Apr 2010 06:25:58 -0000
@@ -1077,7 +1077,8 @@
         * caches, and disable the route entry not to be used in already
         * cached routes.
         */
-       rtrequest(RTM_DELETE, rt_getkey(rt), NULL, rt_mask(rt), 0, NULL);
+       rtrequest(RTM_DELETE, rt_getkey(rt),
+                       rt->rt_gateway, rt_mask(rt), rt->rt_flags, NULL);
 
        return next;
 }
------------------------------------------------------------------------



Home | Main Index | Thread Index | Old Index