diff options
author | Peter Hessler <phessler@cvs.openbsd.org> | 2015-10-22 11:13:17 +0000 |
---|---|---|
committer | Peter Hessler <phessler@cvs.openbsd.org> | 2015-10-22 11:13:17 +0000 |
commit | a798b6510b942ffcf6cf73a67cb24c436f37043f (patch) | |
tree | 27487db8b0d6f1a4f4fd4e204e7afb62dd461899 /usr.sbin/bgpd | |
parent | 1a1a00c0ce5ce5fae2b138b4e703ff7355ee1c47 (diff) |
If we receive an empty route message, log it and ignore it. Happens
occasionally on FreeBSD.
from Melissa Jenkins
OK claudio@, florian@, benno@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/kroute.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c index b18a0da80d0..89ee84adcf6 100644 --- a/usr.sbin/bgpd/kroute.c +++ b/usr.sbin/bgpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.205 2015/09/16 20:25:41 stsp Exp $ */ +/* $OpenBSD: kroute.c,v 1.206 2015/10/22 11:13:16 phessler Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -3119,8 +3119,10 @@ dispatch_rtmsg_addr(struct rt_msghdr *rtm, struct sockaddr *rti_info[RTAX_MAX], prefixlen = 0; bzero(&prefix, sizeof(prefix)); - if ((sa = rti_info[RTAX_DST]) == NULL) - return (-1); + if ((sa = rti_info[RTAX_DST]) == NULL) { + log_warnx("empty route message"); + return (0); + } if (rtm->rtm_flags & RTF_STATIC) flags |= F_STATIC; |