Sat Aug 25 07:06:48 2018 UTC ()
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.


(martin)
diff -r1.155.4.3 -r1.155.4.4 src/sbin/route/route.c

cvs diff -r1.155.4.3 -r1.155.4.4 src/sbin/route/route.c (expand / switch to context diff)
--- src/sbin/route/route.c 2018/04/09 13:34:11 1.155.4.3
+++ src/sbin/route/route.c 2018/08/25 07:06:48 1.155.4.4
@@ -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 @@
 #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 @@
 		}
 		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;
 	}
 }