summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/kroute.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bgpd/kroute.c')
-rw-r--r--usr.sbin/bgpd/kroute.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c
index c16404e0909..b7b45d2ac69 100644
--- a/usr.sbin/bgpd/kroute.c
+++ b/usr.sbin/bgpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.145 2006/03/22 13:30:35 claudio Exp $ */
+/* $OpenBSD: kroute.c,v 1.146 2006/04/12 14:23:46 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -2123,21 +2123,23 @@ dispatch_rtmsg(void)
lim = buf + n;
for (next = buf; next < lim; next += rtm->rtm_msglen) {
rtm = (struct rt_msghdr *)next;
- sa = (struct sockaddr *)(rtm + 1);
- get_rtaddrs(rtm->rtm_addrs, sa, rti_info);
-
- if (rtm->rtm_pid == kr_state.pid) /* cause by us */
- continue;
-
- if (rtm->rtm_errno) /* failed attempts... */
- continue;
switch (rtm->rtm_type) {
case RTM_ADD:
case RTM_CHANGE:
case RTM_DELETE:
+ sa = (struct sockaddr *)(rtm + 1);
+ get_rtaddrs(rtm->rtm_addrs, sa, rti_info);
+
+ if (rtm->rtm_pid == kr_state.pid) /* cause by us */
+ continue;
+
+ if (rtm->rtm_errno) /* failed attempts... */
+ continue;
+
if (rtm->rtm_flags & RTF_LLINFO) /* arp cache */
continue;
+
if (dispatch_rtmsg_addr(rtm, rti_info) == -1)
return (-1);
break;