From e43dd51816909411abffd452ef6f8b126583379b Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sun, 3 Jan 2010 03:00:24 +0000 Subject: [PATCH] Ignore some routing messages indicating changes that don't affect our set of local addresses. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23570 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/network.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/kdc/network.c b/src/kdc/network.c index 00218a7cd..dfb478c9c 100644 --- a/src/kdc/network.c +++ b/src/kdc/network.c @@ -846,6 +846,30 @@ static void process_routing_update(struct connection *conn, int selflags) case RTM_IFINFO: case RTM_OLDADD: case RTM_OLDDEL: + /* + * Some flags indicate routing table updates that don't + * indicate local address changes. They may come from + * redirects, or ARP, etc. + * + * This set of symbols is just an initial guess based on + * some messages observed in real life; working out which + * other flags also indicate messages we should ignore, + * and which flags are portable to all system and thus + * don't need to be conditionalized, is left as a future + * exercise. + */ +#ifdef RTF_DYNAMIC + if (rtm.rtm_flags & RTF_DYNAMIC) + break; +#endif +#ifdef RTF_CLONED + if (rtm.rtm_flags & RTF_CLONED) + break; +#endif +#ifdef RTF_LLINFO + if (rtm.rtm_flags & RTF_LLINFO) + break; +#endif #if 0 krb5_klog_syslog(LOG_DEBUG, "network reconfiguration message (%s) received", -- 2.26.2