From ccc53de916c6b3b9d27a31b2e12aa3d606257ee5 Mon Sep 17 00:00:00 2001 From: "Andrey V. Elsukov" Date: Mon, 1 Sep 2014 09:30:34 +0000 Subject: [PATCH] Add the reverse part to rule #9. Also change its description in the netstat(8) output. MFC after: 1 week --- sys/netinet6/in6_src.c | 2 ++ usr.bin/netstat/inet6.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index 2c022ae92cb5..34fa0801354b 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -448,6 +448,8 @@ in6_selectsrc(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, */ if (ifa_preferred(&ia_best->ia_ifa, &ia->ia_ifa)) REPLACE(9); + if (ifa_preferred(&ia->ia_ifa, &ia_best->ia_ifa)) + NEXT(9); /* * Rule 14: Use longest matching prefix. diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c index 768ccf22a7ec..a44ff3ebf44f 100644 --- a/usr.bin/netstat/inet6.c +++ b/usr.bin/netstat/inet6.c @@ -345,7 +345,7 @@ static const char *srcrule_str[] = { "matching label", "public/temporary address", "alive interface", - "preferred interface", + "better virtual status", "rule #10", "rule #11", "rule #12",