diff options
author | 2015-11-03 07:48:03 +0000 | |
---|---|---|
committer | 2015-11-03 07:48:03 +0000 | |
commit | 24c1c3e2015cdf4666e32db9f391a9fb302e952c (patch) | |
tree | 6b0cea4fbdc58066fa99206caffa9f32db4da751 | |
parent | zap the correspoonding note in systrace(4) - tedu says (diff) | |
download | wireguard-openbsd-24c1c3e2015cdf4666e32db9f391a9fb302e952c.tar.xz wireguard-openbsd-24c1c3e2015cdf4666e32db9f391a9fb302e952c.zip |
When updating an interface, do not delete the kif_node but let
fetchifs() update the existing node. Thus we don't lose the ARP entries.
And while here, also handle RTM_DESYNC messages.
ok mikeb@
-rw-r--r-- | usr.sbin/snmpd/kroute.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/snmpd/kroute.c b/usr.sbin/snmpd/kroute.c index fdc4dfdbe44..9833645e604 100644 --- a/usr.sbin/snmpd/kroute.c +++ b/usr.sbin/snmpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.31 2015/07/18 00:27:32 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.32 2015/11/03 07:48:03 gerhard Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org> @@ -365,12 +365,6 @@ kr_iflastchange(void) int kr_updateif(u_int if_index) { - struct kif_node *kn; - - if ((kn = kif_find(if_index)) != NULL) - kif_remove(kn); - - /* Do not update the interface address list */ return (fetchifs(if_index)); } @@ -1381,6 +1375,12 @@ rtmsg_process(char *buf, int len) case RTM_IFANNOUNCE: if_announce(next); break; + case RTM_DESYNC: + kr_shutdown(); + if (fetchifs(0) == -1) + fatalx("rtmsg_process: fetchifs"); + ktable_init(); + break; default: /* ignore for now */ break; |