Source-Changes-HG archive

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

[src/trunk]: src Drop RTF_UP from a routing message of a deleted ARP/NDP entry



details:   https://anonhg.NetBSD.org/src/rev/bb05054e7b86
branches:  trunk
changeset: 354708:bb05054e7b86
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Mon Jun 26 06:59:56 2017 +0000

description:
Drop RTF_UP from a routing message of a deleted ARP/NDP entry

diffstat:

 sys/net/rtsock.c       |  5 +++--
 tests/net/arp/t_arp.sh |  4 ++--
 tests/net/ndp/t_ndp.sh |  4 ++--
 3 files changed, 7 insertions(+), 6 deletions(-)

diffs (62 lines):

diff -r 8696a03d8485 -r bb05054e7b86 sys/net/rtsock.c
--- a/sys/net/rtsock.c  Mon Jun 26 06:58:42 2017 +0000
+++ b/sys/net/rtsock.c  Mon Jun 26 06:59:56 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtsock.c,v 1.222 2017/06/26 06:58:42 ozaki-r Exp $     */
+/*     $NetBSD: rtsock.c,v 1.223 2017/06/26 06:59:56 ozaki-r Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.222 2017/06/26 06:58:42 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.223 2017/06/26 06:59:56 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -860,6 +860,7 @@
                            satocsdl(info.rti_info[RTAX_GATEWAY]);
                        error = lla_rt_output(rtm->rtm_type, rtm->rtm_flags,
                            rtm->rtm_rmx.rmx_expire, &info, sdlp->sdl_index);
+                       rtm->rtm_flags &= ~RTF_UP;
                        break;
                }
 #endif
diff -r 8696a03d8485 -r bb05054e7b86 tests/net/arp/t_arp.sh
--- a/tests/net/arp/t_arp.sh    Mon Jun 26 06:58:42 2017 +0000
+++ b/tests/net/arp/t_arp.sh    Mon Jun 26 06:59:56 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_arp.sh,v 1.29 2017/06/26 03:16:28 ozaki-r Exp $
+#      $NetBSD: t_arp.sh,v 1.30 2017/06/26 06:59:57 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -651,7 +651,7 @@
        atf_check -s exit:0 -o match:"$str" grep -A 3 RTM_GET $file
        str="$IP4DST $macaddr_dst"
        atf_check -s exit:0 -o match:"$str" grep -A 3 RTM_GET $file
-       str="RTM_DELETE.+<UP,DONE,LLINFO>"
+       str="RTM_DELETE.+<DONE,LLINFO>"
        atf_check -s exit:0 -o match:"$str" grep -A 3 RTM_DELETE $file
        str="<DST,GATEWAY>"
        atf_check -s exit:0 -o match:"$str" grep -A 3 RTM_DELETE $file
diff -r 8696a03d8485 -r bb05054e7b86 tests/net/ndp/t_ndp.sh
--- a/tests/net/ndp/t_ndp.sh    Mon Jun 26 06:58:42 2017 +0000
+++ b/tests/net/ndp/t_ndp.sh    Mon Jun 26 06:59:56 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ndp.sh,v 1.26 2017/06/26 03:16:28 ozaki-r Exp $
+#      $NetBSD: t_ndp.sh,v 1.27 2017/06/26 06:59:57 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -450,7 +450,7 @@
        atf_check -s exit:0 -o match:"$str" grep -A 3 RTM_GET $file
        str="$IP6DST $macaddr_dst"
        atf_check -s exit:0 -o match:"$str" grep -A 3 RTM_GET $file
-       str="RTM_DELETE.+<UP,DONE,LLINFO>"
+       str="RTM_DELETE.+<DONE,LLINFO>"
        atf_check -s exit:0 -o match:"$str" grep -A 3 RTM_DELETE $file
        str="<DST,GATEWAY>"
        atf_check -s exit:0 -o match:"$str" grep -A 3 RTM_DELETE $file



Home | Main Index | Thread Index | Old Index