Module Name:    src
Committed By:   ozaki-r
Date:           Mon Jun 26 03:16:28 UTC 2017

Modified Files:
        src/sys/net: rtsock.c
        src/tests/net/arp: t_arp.sh
        src/tests/net/ndp: t_ndp.sh

Log Message:
Improve backward compatibility of (fake) routing messages on adding an ARP/NDP 
entry

A message originally included only DST and GATEWAY. Restore it.


To generate a diff of this commit:
cvs rdiff -u -r1.220 -r1.221 src/sys/net/rtsock.c
cvs rdiff -u -r1.28 -r1.29 src/tests/net/arp/t_arp.sh
cvs rdiff -u -r1.25 -r1.26 src/tests/net/ndp/t_ndp.sh

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

Modified files:

Index: src/sys/net/rtsock.c
diff -u src/sys/net/rtsock.c:1.220 src/sys/net/rtsock.c:1.221
--- src/sys/net/rtsock.c:1.220	Mon Jun 26 03:13:40 2017
+++ src/sys/net/rtsock.c	Mon Jun 26 03:16:28 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock.c,v 1.220 2017/06/26 03:13:40 ozaki-r Exp $	*/
+/*	$NetBSD: rtsock.c,v 1.221 2017/06/26 03:16:28 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.220 2017/06/26 03:13:40 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.221 2017/06/26 03:16:28 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1670,8 +1670,6 @@ rt_clonedmsg(const struct sockaddr *dst,
 	sockaddr_dl_init(&u.sdl, sizeof(u.ss), ifp->if_index, ifp->if_type,
 	    NULL, namelen, NULL, addrlen);
 	info.rti_info[RTAX_GATEWAY] = &u.sa;
-	info.rti_info[RTAX_IFP] = rt->rt_ifp->if_dl->ifa_addr;
-	info.rti_info[RTAX_IFA] = rt->rt_ifa->ifa_addr;
 
 	rt_missmsg(RTM_ADD, &info, flags, 0);
 #undef RTF_LLINFO

Index: src/tests/net/arp/t_arp.sh
diff -u src/tests/net/arp/t_arp.sh:1.28 src/tests/net/arp/t_arp.sh:1.29
--- src/tests/net/arp/t_arp.sh:1.28	Mon Jun 26 03:13:40 2017
+++ src/tests/net/arp/t_arp.sh	Mon Jun 26 03:16:28 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: t_arp.sh,v 1.28 2017/06/26 03:13:40 ozaki-r Exp $
+#	$NetBSD: t_arp.sh,v 1.29 2017/06/26 03:16:28 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -632,9 +632,9 @@ arp_rtm_body()
 
 	str="RTM_ADD.+<UP,HOST,DONE,LLINFO,CLONED>"
 	atf_check -s exit:0 -o match:"$str" cat $file
-	str="<DST,GATEWAY,IFP,IFA>"
+	str="<DST,GATEWAY>"
 	atf_check -s exit:0 -o match:"$str" cat $file
-	str="$IP4DST link#2 $macaddr_src $IP4SRC"
+	str="$IP4DST link#2"
 	atf_check -s exit:0 -o match:"$str" cat $file
 
 	# Test arp -d and resulting routing messages (RTM_GET and RTM_DELETE)

Index: src/tests/net/ndp/t_ndp.sh
diff -u src/tests/net/ndp/t_ndp.sh:1.25 src/tests/net/ndp/t_ndp.sh:1.26
--- src/tests/net/ndp/t_ndp.sh:1.25	Mon Jun 26 03:13:40 2017
+++ src/tests/net/ndp/t_ndp.sh	Mon Jun 26 03:16:28 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: t_ndp.sh,v 1.25 2017/06/26 03:13:40 ozaki-r Exp $
+#	$NetBSD: t_ndp.sh,v 1.26 2017/06/26 03:16:28 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -431,9 +431,9 @@ ndp_rtm_body()
 
 	str="RTM_ADD.+<UP,HOST,DONE,LLINFO,CLONED>"
 	atf_check -s exit:0 -o match:"$str" cat $file
-	str="<DST,GATEWAY,IFP,IFA>"
+	str="<DST,GATEWAY>"
 	atf_check -s exit:0 -o match:"$str" cat $file
-	str="$IP6DST link#2 $macaddr_src $IP6SRC"
+	str="$IP6DST link#2"
 	atf_check -s exit:0 -o match:"$str" cat $file
 
 	# Test ndp -d and resulting routing messages (RTM_GET and RTM_DELETE)

Reply via email to