diff options
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ChangeLog | 8 | ||||
-rw-r--r-- | ospfd/ospf_vty.c | 5 | ||||
-rw-r--r-- | ospfd/ospf_zebra.c | 14 |
3 files changed, 15 insertions, 12 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index 8facd560..b1d6bbec 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -1,3 +1,11 @@ +2005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu> + + * ospf_vty.c: (show_ip_ospf_interface_sub) Show ifindex and interface + flags to help with debugging. + * ospf_zebra.c: (ospf_interface_delete) After deleting, set ifp->ifindex + to IFINDEX_INTERNAL. + (zebra_interface_if_lookup) Make function static. Tighten up code. + 2005-03-31 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * ospf_dump.c: (show_debugging_ospf) Show if ospf event debugging diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 1d2550d3..c0e1f6ce 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -2582,8 +2582,9 @@ show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf, /* Is interface up? */ vty_out (vty, "%s is %s%s", ifp->name, ((is_up = if_is_operative(ifp)) ? "up" : "down"), VTY_NEWLINE); - vty_out (vty, " MTU %u bytes, BW %u Kbit%s", - ifp->mtu, ifp->bandwidth, VTY_NEWLINE); + vty_out (vty, " ifindex %u, MTU %u bytes, BW %u Kbit %s%s", + ifp->ifindex, ifp->mtu, ifp->bandwidth, if_flag_dump(ifp->flags), + VTY_NEWLINE); /* Is interface OSPF enabled? */ if (ospf_oi_count(ifp) == 0) diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 300103e1..74936df9 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -141,26 +141,20 @@ ospf_interface_delete (int command, struct zclient *zclient, if (rn->info) ospf_if_free ((struct ospf_interface *) rn->info); + ifp->ifindex = IFINDEX_INTERNAL; return 0; } -struct interface * +static struct interface * zebra_interface_if_lookup (struct stream *s) { - struct interface *ifp; u_char ifname_tmp[INTERFACE_NAMSIZ]; /* Read interface name. */ stream_get (ifname_tmp, s, INTERFACE_NAMSIZ); - /* Lookup this by interface index. */ - ifp = if_lookup_by_name ((char *) ifname_tmp); - - /* If such interface does not exist, indicate an error */ - if (!ifp) - return NULL; - - return ifp; + /* And look it up. */ + return if_lookup_by_name ((char *) ifname_tmp); } int |