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.
This commit is contained in:
parent
8e76cb2d6e
commit
5d499f6897
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: route.c,v 1.159 2018/03/23 11:57:33 roy Exp $ */
|
||||
/* $NetBSD: route.c,v 1.160 2018/08/14 20:53:07 roy Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1989, 1991, 1993
|
||||
|
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1989, 1991, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: route.c,v 1.159 2018/03/23 11:57:33 roy Exp $");
|
||||
__RCSID("$NetBSD: route.c,v 1.160 2018/08/14 20:53:07 roy Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -1459,11 +1459,14 @@ print_rtmsg(struct rt_msghdr *rtm, int msglen)
|
|||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue