summaryrefslogtreecommitdiff
path: root/usr.sbin/eigrpd
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2016-02-21 18:36:12 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2016-02-21 18:36:12 +0000
commita905bfc8fb2d1b635885537cc2ed1726c12b53e0 (patch)
tree73410701fd22a3ad7fc83d0337ffa7bf25251dcb /usr.sbin/eigrpd
parentd252511f576e54c106c07e7178554b6694a3688e (diff)
Filter our RTM_GET messages which are not from us.
Pulled from ospfd. Original author: claudio@
Diffstat (limited to 'usr.sbin/eigrpd')
-rw-r--r--usr.sbin/eigrpd/kroute.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/eigrpd/kroute.c b/usr.sbin/eigrpd/kroute.c
index f68a305b445..3c269b9af02 100644
--- a/usr.sbin/eigrpd/kroute.c
+++ b/usr.sbin/eigrpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.7 2016/01/15 12:41:09 renato Exp $ */
+/* $OpenBSD: kroute.c,v 1.8 2016/02/21 18:36:11 renato Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -1398,15 +1398,16 @@ rtmsg_process(char *buf, size_t len)
case RTM_GET:
case RTM_CHANGE:
case RTM_DELETE:
- if (rtm->rtm_pid == kr_state.pid)
- continue;
-
if (rtm->rtm_errno) /* failed attempts... */
continue;
if (rtm->rtm_tableid != kr_state.rdomain)
continue;
+ if (rtm->rtm_type == RTM_GET &&
+ rtm->rtm_pid != kr_state.pid)
+ continue;
+
/* Skip ARP/ND cache and broadcast routes. */
if (rtm->rtm_flags & (RTF_LLINFO|RTF_BROADCAST))
continue;