]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: export ospf_if_table_lookup() and use it in ospf_network_run_interface()
authorJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
Mon, 27 Jul 2009 10:42:29 +0000 (12:42 +0200)
committerPaul Jakma <paul@quagga.net>
Tue, 28 Jul 2009 17:40:47 +0000 (18:40 +0100)
Makes it possible to run OSPF on multiple PtP interfaces
with the same remote address.

* ospfd/ospf_interface.c: Export ospf_if_table_lookup().
* ospfd/ospf_interface.h: ditto.
* ospfd/ospfd.c: (ospf_network_run_interface) Use ospf_if_table_lookup() to
  determine whether OSPF is already configured for a subnet and interface.

ospfd/ospf_interface.c
ospfd/ospf_interface.h
ospfd/ospfd.c

index 951c19a800137bde090f5b070f3eef4f4e24ddff..4eccee76725d75b61459ef6d12c77c0c2462ee46 100644 (file)
@@ -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;
index 79b178d8543e88f4a72287ab7ea2a340c49b5bdf..0fc4ccba83d3a27be819952c56761bb1a1e894e1 100644 (file)
@@ -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);
index 08e410056507713ab079e3adca4fb25a7719565a..b86986b5686bcb9ca0b51ff955c30d9a4363e5b9 100644 (file)
@@ -901,15 +901,12 @@ ospf_network_run_interface (struct prefix *p, struct ospf_area *area,
      then create socket and join multicast group. */
   for (ALL_LIST_ELEMENTS_RO (ifp->connected, cnode, co))
     {
-      struct prefix *addr;
-      
+
       if (CHECK_FLAG(co->flags,ZEBRA_IFA_SECONDARY))
         continue;
 
-      addr = CONNECTED_ID(co);
-
       if (p->family == co->address->family 
-          && ! ospf_if_is_configured (area->ospf, &(addr->u.prefix4))
+         && ! ospf_if_table_lookup(ifp, co->address)
           && ospf_network_match_iface(co,p))
         {
            struct ospf_interface *oi;