[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quagga-dev
Subject:    [quagga-dev 5549] [PATCH 05/11] export ospf_if_table_lookup() and use
From:       Joakim Tjernlund <Joakim.Tjernlund () transmode ! se>
Date:       2008-07-02 13:51:33
Message-ID: 1215006699-12383-6-git-send-email-Joakim.Tjernlund () transmode ! se
[Download RAW message or body]

Makes it possible to run OSPF on multiple PtP interfaces
with the same remote address.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
 ospfd/ospf_interface.c |    2 +-
 ospfd/ospf_interface.h |    2 ++
 ospfd/ospfd.c          |    2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index dd0bc51..a6782a5 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -145,7 +145,7 @@ ospf_if_reset_variables (struct ospf_interface *oi)
 }
 
 /* lookup oi for specified prefix/ifp */
-static struct ospf_interface *
+struct ospf_interface *
 ospf_if_table_lookup (struct interface *ifp, struct prefix *prefix)
 {
   struct prefix p;
diff --git a/ospfd/ospf_interface.h b/ospfd/ospf_interface.h
index f5e6945..2fe5565 100644
--- a/ospfd/ospf_interface.h
+++ b/ospfd/ospf_interface.h
@@ -248,6 +248,8 @@ extern struct ospf_interface *ospf_if_lookup_by_local_addr (struct ospf *,
 							    struct in_addr);
 extern struct ospf_interface *ospf_if_lookup_by_prefix (struct ospf *,
 							struct prefix_ipv4 *);
+extern struct ospf_interface *ospf_if_table_lookup (struct interface *,
+						    struct prefix *);
 extern struct ospf_interface *ospf_if_addr_local (struct in_addr);
 extern struct ospf_interface *ospf_if_lookup_recv_if (struct ospf *,
 						      struct in_addr);
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index a4c4fac..2b3c322 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -887,7 +887,7 @@ ospf_network_run (struct ospf *ospf, struct prefix *p, struct ospf_area *area)
 	  addr = CONNECTED_ID(co);
 
 	  if (p->family == co->address->family 
-	      && ! ospf_if_is_configured (ospf, &(addr->u.prefix4))
+	      && ! ospf_if_table_lookup(ifp, co->address)
 	      && ospf_network_match_iface(co,p))
 	    {
 	       struct ospf_interface *oi;
-- 
1.5.5.4

_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
http://lists.quagga.net/mailman/listinfo/quagga-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic