summaryrefslogtreecommitdiff
path: root/ospfd/ospf_interface.c
diff options
context:
space:
mode:
authorajs <ajs>2005-03-29 17:03:49 +0000
committerajs <ajs>2005-03-29 17:03:49 +0000
commita608bbf27b48b7bd5e63f1c46380a1c5288ba48a (patch)
tree5317bf773d9a90337fa9cef8ca24127f127dc2bc /ospfd/ospf_interface.c
parent5dcbdf82efdf65313a04ea45f2c8f7307c7ab671 (diff)
2005-03-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* rt_netlink.c: (netlink_link_change) If the status of an operative interface changes (e.g. MTU changes), the client daemons should be notified by calling zebra_interface_up_update. Previously, the information was being updated in zebra's interface structure, but the clients were not notified of changes to an operative interface. * ospf_zebra.c: (ospf_interface_state_up) If the MTU of an operative interface changes, print a debug message and call ospf_if_reset() to simulate down/up on the interface. * ospf_interface.h: Declare new function ospf_if_reset(). * ospf_interface.c: (ospf_if_reset) New function to call ospf_if_down and ospf_if_up for all ospf interfaces attached to an interface.
Diffstat (limited to 'ospfd/ospf_interface.c')
-rw-r--r--ospfd/ospf_interface.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index df71fad6..b76abe58 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -102,6 +102,25 @@ ospf_if_recalculate_output_cost (struct interface *ifp)
}
}
+/* Simulate down/up on the interface. This is needed, for example, when
+ the MTU changes. */
+void
+ospf_if_reset(struct interface *ifp)
+{
+ struct route_node *rn;
+
+ for (rn = route_top (IF_OIFS (ifp)); rn; rn = route_next (rn))
+ {
+ struct ospf_interface *oi;
+
+ if ( (oi = rn->info) == NULL)
+ continue;
+
+ ospf_if_down(oi);
+ ospf_if_up(oi);
+ }
+}
+
void
ospf_if_reset_variables (struct ospf_interface *oi)
{