summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
authorpaul <paul>2002-12-13 21:03:13 +0000
committerpaul <paul>2002-12-13 21:03:13 +0000
commit2e3b2e474ed5ba04744b167132a84f9954485af4 (patch)
treecc07fb34a1bf21ead5cc3ad69e4a9dfde2b43b0e /ospfd
parent7afa08da2d3690baee1739da400775f8543f5863 (diff)
zebra link state detection support
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_ase.c2
-rw-r--r--ospfd/ospf_lsa.c8
-rw-r--r--ospfd/ospf_vty.c11
-rw-r--r--ospfd/ospf_zebra.c3
-rw-r--r--ospfd/ospfd.c2
5 files changed, 13 insertions, 13 deletions
diff --git a/ospfd/ospf_ase.c b/ospfd/ospf_ase.c
index 9194c566..b60aa071 100644
--- a/ospfd/ospf_ase.c
+++ b/ospfd/ospf_ase.c
@@ -154,7 +154,7 @@ ospf_ase_forward_address_check (struct in_addr fwd_addr)
for (ifn = listhead (ospf_top->oiflist); ifn; nextnode (ifn))
if ((oi = getdata (ifn)) != NULL)
- if (if_is_up (oi->ifp))
+ if (if_is_operative (oi->ifp))
if (oi->type != OSPF_IFTYPE_VIRTUALLINK)
if (IPV4_ADDR_SAME (&oi->address->u.prefix4, &fwd_addr))
return 0;
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 6d7af058..a4495e97 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -640,7 +640,7 @@ router_lsa_link_set (struct stream *s, struct ospf_area *area)
struct interface *ifp = oi->ifp;
/* Check interface is up, OSPF is enable. */
- if (if_is_up (ifp))
+ if (if_is_operative (ifp))
{
if (oi->state != ISM_Down)
{
@@ -1391,7 +1391,7 @@ ospf_external_lsa_nexthop_get (struct in_addr nexthop)
{
struct ospf_interface *oi = getdata (n1);
- if (if_is_up (oi->ifp))
+ if (if_is_operative (oi->ifp))
if (oi->address->family == AF_INET)
if (prefix_match (oi->address, &nh))
return nexthop;
@@ -1412,7 +1412,7 @@ ospf_get_ip_from_ifp (struct ospf_interface *oi)
fwd.s_addr = 0;
- if (if_is_up (oi->ifp))
+ if (if_is_operative (oi->ifp))
return oi->address->u.prefix4;
return fwd;
@@ -1432,7 +1432,7 @@ ospf_get_nssa_ip (void)
{
struct ospf_interface *oi = getdata (n1);
- if (if_is_up (oi->ifp))
+ if (if_is_operative (oi->ifp))
if (oi->area->external_routing == OSPF_AREA_NSSA)
if (oi->address && oi->address->family == AF_INET)
return (oi->address->u.prefix4 );
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 73215fa5..accf7a8c 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -2526,12 +2526,11 @@ show_ip_ospf_interface_sub (struct vty *vty, struct interface *ifp)
oi_count = ospf_oi_count (ifp);
/* Is interface up? */
- if (if_is_up (ifp))
- vty_out (vty, "%s is up, line protocol is up%s", ifp->name, VTY_NEWLINE);
- else
- {
- vty_out (vty, "%s is down, line protocol is down%s", ifp->name,
- VTY_NEWLINE);
+ if (if_is_operative (ifp)) {
+ vty_out (vty, "%s is up%s", ifp->name, VTY_NEWLINE);
+ } else
+ {
+ vty_out (vty, "%s is down%s", ifp->name, VTY_NEWLINE);
if (oi_count == 0)
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 1ad31f29..72ffe76f 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -154,6 +154,7 @@ zebra_interface_if_set_value (struct stream *s, struct interface *ifp)
ifp->ifindex = stream_getl (s);
/* Read interface's value. */
+ ifp->status = stream_getc (s);
ifp->flags = stream_getl (s);
ifp->metric = stream_getl (s);
ifp->mtu = stream_getl (s);
@@ -175,7 +176,7 @@ ospf_interface_state_up (int command, struct zclient *zclient,
return 0;
/* Interface is already up. */
- if (if_is_up (ifp))
+ if (if_is_operative (ifp))
{
/* Temporarily keep ifp values. */
memcpy (&if_tmp, ifp, sizeof (struct interface));
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index e7de8eab..e8bd360b 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -761,7 +761,7 @@ ospf_network_run (struct ospf *ospf, struct prefix *p, struct ospf_area *area)
ospf_area_add_if (oi->area, oi);
- if (if_is_up (ifp))
+ if (if_is_operative (ifp))
ospf_if_up (oi);
break;