diff options
author | ajs <ajs> | 2005-03-29 17:03:49 +0000 |
---|---|---|
committer | ajs <ajs> | 2005-03-29 17:03:49 +0000 |
commit | a608bbf27b48b7bd5e63f1c46380a1c5288ba48a (patch) | |
tree | 5317bf773d9a90337fa9cef8ca24127f127dc2bc /ospfd/ospf_zebra.c | |
parent | 5dcbdf82efdf65313a04ea45f2c8f7307c7ab671 (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_zebra.c')
-rw-r--r-- | ospfd/ospf_zebra.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 8468aed9..300103e1 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -168,7 +168,6 @@ ospf_interface_state_up (int command, struct zclient *zclient, zebra_size_t length) { struct interface *ifp; - struct interface if_tmp; struct ospf_interface *oi; struct route_node *rn; @@ -181,6 +180,7 @@ ospf_interface_state_up (int command, struct zclient *zclient, if (if_is_operative (ifp)) { /* Temporarily keep ifp values. */ + struct interface if_tmp; memcpy (&if_tmp, ifp, sizeof (struct interface)); zebra_interface_if_set_value (zclient->ibuf, ifp); @@ -196,6 +196,16 @@ ospf_interface_state_up (int command, struct zclient *zclient, ospf_if_recalculate_output_cost (ifp); } + + if (if_tmp.mtu != ifp->mtu) + { + if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE)) + zlog_debug ("Zebra: Interface[%s] MTU change %u -> %u.", + ifp->name, if_tmp.mtu, ifp->mtu); + + /* Must reset the interface (simulate down/up) when MTU changes. */ + ospf_if_reset(ifp); + } return 0; } |