routing table and interface list, do a reload of the kernel state.
ive been running this in production for 2 or 3 weeks.
tested by sthen@
ok sthen@ claudio@ deraadt@
code written by andrew sallaway at the univeristy of queensland.
-/* $OpenBSD: kroute.c,v 1.86 2010/07/12 14:35:13 bluhm Exp $ */
+/* $OpenBSD: kroute.c,v 1.87 2010/07/14 01:00:32 dlg Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
{
struct kroute_node *krn, *kr, *kn;
+ log_info("reloading interface list and routing table");
+
kr_state.fib_serial++;
if (fetchifs(0) == -1 || fetchtable() == -1)
case RTM_IFANNOUNCE:
if_announce(next);
break;
+ case RTM_DESYNC:
+ /*
+ * We lost some routing packets. Force a reload of
+ * the kernel route/interface information.
+ */
+ kr_fib_reload();
+ break;
default:
/* ignore for now */
break;