Author: adrian.chadd
Date: Tue Feb 24 08:48:17 2009
New Revision: 13864

Modified:
    playpen/LUSCA_HEAD_bgp/src/bgp.c

Log:
Don't bother clearing routes.



Modified: playpen/LUSCA_HEAD_bgp/src/bgp.c
==============================================================================
--- playpen/LUSCA_HEAD_bgp/src/bgp.c    (original)
+++ playpen/LUSCA_HEAD_bgp/src/bgp.c    Tue Feb 24 08:48:17 2009
@@ -35,6 +35,9 @@
                bgp_set_rem(&bc->bi, Config.bgp.remote_as);
                memcpy(&bc->rem_ip, &Config.bgp.remote_ip, sizeof(bc->rem_ip));
                bc->rem_port = 179;
+               /* We don't need the routes to be withdrawn on shutdown or 
withdraw;  
this is not IP forwarding.. */
+               bgp_clear_rib_on_shutdown(&bc->bi, 0);
+               bgp_clear_rib_on_withdraw(&bc->bi, 0);
                /* Kick it alive */
                bgp_conn_begin_connect(bc);
        }
@@ -58,4 +61,13 @@

        bgp_conn_destroy(bc);
        bc = NULL;
+}
+
+int
+bgpLookupAsNum(struct in_addr ipaddr)
+{
+       if ( ! Config.bgp.enable || ! bc)
+               return -1;
+
+       return bgp_rib_match_host(&bc->bi.rn, ipaddr);
  }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to