summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ospf6d/interface.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2011-07-07 17:10:48 +0000
committerclaudio <claudio@openbsd.org>2011-07-07 17:10:48 +0000
commit42176c476ba7c39540c0daf71be136efa0bba46d (patch)
treeb82c4b52f12ff7df20dca9371949be4aa4670e22 /usr.sbin/ospf6d/interface.c
parentOnly send interface address changes to the ospfe/rde if the interface (diff)
downloadwireguard-openbsd-42176c476ba7c39540c0daf71be136efa0bba46d.tar.xz
wireguard-openbsd-42176c476ba7c39540c0daf71be136efa0bba46d.zip
Rework the distribution of link state and iface FSM state changes.
Link state changes are sent from the parent to both childs and iface FSM state changes are sent from the ospfe to the rde.
Diffstat (limited to 'usr.sbin/ospf6d/interface.c')
-rw-r--r--usr.sbin/ospf6d/interface.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ospf6d/interface.c b/usr.sbin/ospf6d/interface.c
index ad86e2a0fe9..c1b1f744f19 100644
--- a/usr.sbin/ospf6d/interface.c
+++ b/usr.sbin/ospf6d/interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interface.c,v 1.18 2011/07/04 04:34:14 claudio Exp $ */
+/* $OpenBSD: interface.c,v 1.19 2011/07/07 17:10:48 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -145,12 +145,12 @@ if_fsm(struct iface *iface, enum iface_event event)
if (iface->state != old_state) {
orig_rtr_lsa(iface);
orig_link_lsa(iface);
+
+ /* state change inform RDE */
+ ospfe_imsg_compose_rde(IMSG_IFINFO, iface->self->peerid, 0,
+ &iface->state, sizeof(iface->state));
}
- /* Inform RDE in any case since the link state may have changed */
- ospfe_imsg_compose_rde(IMSG_IFINFO,
- iface->self->peerid, 0, iface, sizeof(struct iface));
-
if (old_state & (IF_STA_MULTI | IF_STA_POINTTOPOINT) &&
(iface->state & (IF_STA_MULTI | IF_STA_POINTTOPOINT)) == 0)
ospfe_demote_iface(iface, 0);