From 78de739ba8a7b4c8c07a7bbbf733fe2524a5e8b4 Mon Sep 17 00:00:00 2001 From: phessler Date: Thu, 22 Oct 2015 11:13:16 +0000 Subject: [PATCH] If we receive an empty route message, log it and ignore it. Happens occasionally on FreeBSD. from Melissa Jenkins OK claudio@, florian@, benno@ --- usr.sbin/bgpd/kroute.c | 8 +++++--- 1 file 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 @@ -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; -- 2.20.1