From a905bfc8fb2d1b635885537cc2ed1726c12b53e0 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Sun, 21 Feb 2016 18:36:12 +0000 Subject: Filter our RTM_GET messages which are not from us. Pulled from ospfd. Original author: claudio@ --- usr.sbin/eigrpd/kroute.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'usr.sbin/eigrpd') 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 @@ -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; -- cgit v1.2.3