There is an undocument feature that ``route -vnd flush'' prints

a nice dump of the entire routing table.  Allow non-root users
to see it too.
This commit is contained in:
Ruslan Ermilov 2003-04-16 12:06:53 +00:00
parent 5ea3e23965
commit 1becd59e62

View File

@ -213,7 +213,7 @@ flushroutes(argc, argv)
char *buf, *next, *lim;
struct rt_msghdr *rtm;
if (uid) {
if (uid && !debugonly) {
errx(EX_NOPERM, "must be root to alter routing table");
}
shutdown(s, 0); /* Don't want to read back our messages */