lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu,  9 Jun 2016 13:05:42 -0700
From:	David Ahern <dsa@...ulusnetworks.com>
To:	netdev@...r.kernel.org
Cc:	stephen@...workplumber.org, David Ahern <dsa@...ulusnetworks.com>
Subject: [PATCH iproute2] ip route: Add annotation for replaced routes

If NLM_F_REPLACE flag is set then a route is replacing an existing route.
Prepend "Replaced " to these routes similar to how "Deleted " is added
to deleted routes.

Signed-off-by: David Ahern <dsa@...ulusnetworks.com>
---
 ip/iproute.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ip/iproute.c b/ip/iproute.c
index 8224d7ffa94b..28b47bcb7312 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -363,6 +363,8 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 			return 0;
 	}
 
+	if (n->nlmsg_flags & NLM_F_REPLACE)
+		fprintf(fp, "Replaced ");
 	if (n->nlmsg_type == RTM_DELROUTE)
 		fprintf(fp, "Deleted ");
 	if ((r->rtm_type != RTN_UNICAST || show_details > 0) && !filter.type)
-- 
2.1.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ