CVS commit: [netbsd-8] src/sbin/route
Module Name:src Committed By: martin Date: Sat Aug 25 07:06:48 UTC 2018 Modified Files: src/sbin/route [netbsd-8]: route.c Log Message: Pull up following revision(s) (requested by roy in ticket #976): sbin/route/route.c: revision 1.160 Resolve every route(4) message type before printing anything more about it other than the type and length. This solves the issue where RTM_ONEWADDR is received and it tries to parse route information from it. To generate a diff of this commit: cvs rdiff -u -r1.155.4.3 -r1.155.4.4 src/sbin/route/route.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/route/route.c diff -u src/sbin/route/route.c:1.155.4.3 src/sbin/route/route.c:1.155.4.4 --- src/sbin/route/route.c:1.155.4.3 Mon Apr 9 13:34:11 2018 +++ src/sbin/route/route.c Sat Aug 25 07:06:48 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: route.c,v 1.155.4.3 2018/04/09 13:34:11 bouyer Exp $ */ +/* $NetBSD: route.c,v 1.155.4.4 2018/08/25 07:06:48 martin Exp $ */ /* * Copyright (c) 1983, 1989, 1991, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: route.c,v 1.155.4.3 2018/04/09 13:34:11 bouyer Exp $"); +__RCSID("$NetBSD: route.c,v 1.155.4.4 2018/08/25 07:06:48 martin Exp $"); #endif #endif /* not lint */ @@ -1462,11 +1462,14 @@ print_rtmsg(struct rt_msghdr *rtm, int m } printf("\n"); break; - default: + case RTM_ADD: + case RTM_DELETE: + case RTM_GET: (void)printf("pid %d, seq %d, errno %d, flags: ", rtm->rtm_pid, rtm->rtm_seq, rtm->rtm_errno); bprintf(stdout, rtm->rtm_flags, routeflags); pmsg_common(rtm); + break; } }
CVS commit: [netbsd-8] src/sbin/route
Module Name:src Committed By: snj Date: Thu Dec 21 21:33:31 UTC 2017 Modified Files: src/sbin/route [netbsd-8]: route.c Log Message: Pull up following revision(s) (requested by uwe in ticket #448): sbin/route/route.c: revision 1.157 Fix typo in flag name. We should probably just use IFFBITS string that defines. PR bin/52815 To generate a diff of this commit: cvs rdiff -u -r1.155.4.1 -r1.155.4.2 src/sbin/route/route.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/route/route.c diff -u src/sbin/route/route.c:1.155.4.1 src/sbin/route/route.c:1.155.4.2 --- src/sbin/route/route.c:1.155.4.1 Fri Jul 7 13:57:26 2017 +++ src/sbin/route/route.c Thu Dec 21 21:33:31 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: route.c,v 1.155.4.1 2017/07/07 13:57:26 martin Exp $ */ +/* $NetBSD: route.c,v 1.155.4.2 2017/12/21 21:33:31 snj Exp $ */ /* * Copyright (c) 1983, 1989, 1991, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: route.c,v 1.155.4.1 2017/07/07 13:57:26 martin Exp $"); +__RCSID("$NetBSD: route.c,v 1.155.4.2 2017/12/21 21:33:31 snj Exp $"); #endif #endif /* not lint */ @@ -1296,7 +1296,7 @@ const char metricnames[] = const char routeflags[] = "\1UP\2GATEWAY\3HOST\4REJECT\5DYNAMIC\6MODIFIED\7DONE\010MASK_PRESENT\011CONNECTED\012XRESOLVE\013LLINFO\014STATIC\015BLACKHOLE\016CLONED\017PROTO2\020PROTO1\023LOCAL\024BROADCAST"; const char ifnetflags[] = -"\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5PTP\6NOTRAILERS\7RUNNING\010NOARP\011PPROMISC\012ALLMULTI\013OACTIVE\014SIMPLEX\015LINK0\016LINK1\017LINK2\020MULTICAST"; +"\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5PTP\6NOTRAILERS\7RUNNING\010NOARP\011PROMISC\012ALLMULTI\013OACTIVE\014SIMPLEX\015LINK0\016LINK1\017LINK2\020MULTICAST"; const char addrnames[] = "\1DST\2GATEWAY\3NETMASK\4GENMASK\5IFP\6IFA\7AUTHOR\010BRD\011TAG";
CVS commit: [netbsd-8] src/sbin/route
Module Name:src Committed By: snj Date: Tue Jul 25 01:34:23 UTC 2017 Modified Files: src/sbin/route [netbsd-8]: rtutil.c Log Message: Pull up following revision(s) (requested by manu in ticket #131): sbin/route/rtutil.c: revision 1.10 Fix route and netstat -r output when built with -DSMALL A missing \n caused the routing table to be printed all in one line if -DSMALL was used. To generate a diff of this commit: cvs rdiff -u -r1.8.8.1 -r1.8.8.2 src/sbin/route/rtutil.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/route/rtutil.c diff -u src/sbin/route/rtutil.c:1.8.8.1 src/sbin/route/rtutil.c:1.8.8.2 --- src/sbin/route/rtutil.c:1.8.8.1 Fri Jul 7 13:57:26 2017 +++ src/sbin/route/rtutil.c Tue Jul 25 01:34:23 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rtutil.c,v 1.8.8.1 2017/07/07 13:57:26 martin Exp $ */ +/* $NetBSD: rtutil.c,v 1.8.8.2 2017/07/25 01:34:23 snj Exp $ */ /* $OpenBSD: show.c,v 1.1 2006/05/27 19:16:37 claudio Exp $ */ /* @@ -304,6 +304,8 @@ p_rtentry(struct rt_msghdr *rtm, int fla putchar('\n'); if (flags & RT_VFLAG) p_rtrmx(>rtm_rmx); +#else + putchar('\n'); #endif }