Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Drop RTF_LLINFO flag (now it's RTF_LLDATA) from local routes
details: https://anonhg.NetBSD.org/src/rev/99ec6a5552bb
branches: trunk
changeset: 354754:99ec6a5552bb
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Wed Jun 28 04:10:47 2017 +0000
description:
Drop RTF_LLINFO flag (now it's RTF_LLDATA) from local routes
They don't have llinfo anymore. And also the change fixes unexpected
behavior of ARP proxy.
diffstat:
sys/net/route.c | 6 ++----
tests/net/arp/t_arp.sh | 28 +++++++++-------------------
tests/net/route/t_route.sh | 6 +++---
3 files changed, 14 insertions(+), 26 deletions(-)
diffs (121 lines):
diff -r 98b43bd54b02 -r 99ec6a5552bb sys/net/route.c
--- a/sys/net/route.c Wed Jun 28 03:57:36 2017 +0000
+++ b/sys/net/route.c Wed Jun 28 04:10:47 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.196 2017/06/22 09:56:48 ozaki-r Exp $ */
+/* $NetBSD: route.c,v 1.197 2017/06/28 04:10:47 ozaki-r Exp $ */
/*-
* Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.196 2017/06/22 09:56:48 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.197 2017/06/28 04:10:47 ozaki-r Exp $");
#include <sys/param.h>
#ifdef RTFLUSH_DEBUG
@@ -1594,8 +1594,6 @@
memset(&info, 0, sizeof(info));
info.rti_flags = RTF_HOST | RTF_LOCAL;
- if (!(ifa->ifa_ifp->if_flags & (IFF_LOOPBACK|IFF_POINTOPOINT)))
- info.rti_flags |= RTF_LLDATA;
info.rti_info[RTAX_DST] = ifa->ifa_addr;
info.rti_info[RTAX_GATEWAY] =
(const struct sockaddr *)ifa->ifa_ifp->if_sadl;
diff -r 98b43bd54b02 -r 99ec6a5552bb tests/net/arp/t_arp.sh
--- a/tests/net/arp/t_arp.sh Wed Jun 28 03:57:36 2017 +0000
+++ b/tests/net/arp/t_arp.sh Wed Jun 28 04:10:47 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_arp.sh,v 1.30 2017/06/26 06:59:57 ozaki-r Exp $
+# $NetBSD: t_arp.sh,v 1.31 2017/06/28 04:10:47 ozaki-r Exp $
#
# Copyright (c) 2015 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -322,10 +322,12 @@
export RUMP_SERVER=$SOCKSRC
# Cannot overwrite a permanent cache
- atf_check -s exit:0 rump.arp -s $IP4SRC b2:a0:20:00:00:ff
+ atf_check -s exit:0 rump.arp -s $IP4DST b2:a0:20:00:00:ff
$DEBUG && rump.arp -n -a
atf_check -s not-exit:0 -e match:'File exists' \
- rump.arp -s $IP4SRC b2:a0:20:00:00:fe
+ rump.arp -s $IP4DST b2:a0:20:00:00:fe
+ # cleanup
+ atf_check -s exit:0 rump.arp -d $IP4DST
atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 $IP4DST
$DEBUG && rump.arp -n -a
@@ -383,11 +385,11 @@
if [ "$type" = "pub" ]; then
opts="pub"
- title="permanent published"
else
opts="pub proxy"
- title='permanent published \(proxy only\)'
fi
+ # Always proxy only since migrating to lltable/llentry
+ title='permanent published \(proxy only\)'
#
# Test#1: First setup an endpoint then create proxy arp entry
@@ -413,26 +415,14 @@
# Try to ping
export RUMP_SERVER=$SOCKSRC
- if [ "$type" = "pub" ]; then
- # XXX fails
- atf_check -s not-exit:0 -o ignore -e ignore \
- rump.ping -n -w 1 -c 1 $IP4DST_PROXYARP1
- else
- atf_check -s exit:0 -o ignore \
- rump.ping -n -w 1 -c 1 $IP4DST_PROXYARP1
- fi
+ atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 $IP4DST_PROXYARP1
extract_new_packets bus1 > ./out
$DEBUG && cat ./out
pkt1=$(make_pkt_str_arprep $IP4DST_PROXYARP1 $macaddr_dst)
pkt2=$(make_pkt_str_garp $IP4DST_PROXYARP1 $macaddr_dst)
- if [ "$type" = "pub" ]; then
- atf_check -s not-exit:0 -x \
- "cat ./out |grep -q -e '$pkt1' -e '$pkt2'"
- else
- atf_check -s exit:0 -x "cat ./out |grep -q -e '$pkt1' -e '$pkt2'"
- fi
+ atf_check -s exit:0 -x "cat ./out |grep -q -e '$pkt1' -e '$pkt2'"
#
# Test#2: Create proxy arp entry then set up an endpoint
diff -r 98b43bd54b02 -r 99ec6a5552bb tests/net/route/t_route.sh
--- a/tests/net/route/t_route.sh Wed Jun 28 03:57:36 2017 +0000
+++ b/tests/net/route/t_route.sh Wed Jun 28 04:10:47 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_route.sh,v 1.12 2017/03/24 03:47:25 ozaki-r Exp $
+# $NetBSD: t_route.sh,v 1.13 2017/06/28 04:10:47 ozaki-r Exp $
#
# Copyright (c) 2016 Internet Initiative Japan Inc.
# All rights reserved.
@@ -234,7 +234,7 @@
destination: 10.0.1.2
local addr: 10.0.1.2
interface: lo0
- flags: <UP,HOST,DONE,LLINFO,LOCAL>
+ flags: <UP,HOST,DONE,LOCAL>
recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
EOF
rump.route -n get $IP4SRC > ./output
@@ -309,7 +309,7 @@
destination: fc00:0:0:1::2
local addr: fc00:0:0:1::2
interface: lo0
- flags: <UP,HOST,DONE,LLINFO,LOCAL>
+ flags: <UP,HOST,DONE,LOCAL>
recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
EOF
rump.route -n get -inet6 $IP6SRC > ./output
Home |
Main Index |
Thread Index |
Old Index