From c21f7fd3e23791cb6ea8a3b0b968af8892c75931 Mon Sep 17 00:00:00 2001 From: Chris Hall Date: Sun, 24 Jan 2010 18:46:20 +0000 Subject: Getting BGP Engine to start and removing warnings. Finish the wiring required to get bgp_msg_read to process OPEN messages into the connection's open_state, and be able to check for correct peer AS, etc. Removed bugs preventing messages from being written. Added BGP Id check to collision detection logic. Removed as many warnings from comilation as possible. Replaced horrible FIFO kludge in the process. (Introduced the even more horrible miyagi kludge.) modified: bgpd/bgp_advertise.c modified: bgpd/bgp_advertise.h modified: bgpd/bgp_connection.c modified: bgpd/bgp_connection.h modified: bgpd/bgp_debug.c modified: bgpd/bgp_fsm.c modified: bgpd/bgp_msg_read.c modified: bgpd/bgp_msg_write.c modified: bgpd/bgp_network.c modified: bgpd/bgp_nexthop.c modified: bgpd/bgp_notification.c modified: bgpd/bgp_open.c modified: bgpd/bgp_packet.c modified: bgpd/bgp_session.c modified: bgpd/bgp_session.h modified: bgpd/bgpd.c modified: lib/Makefile.am modified: lib/distribute.c modified: lib/if_rmap.c new file: lib/miyagi.h modified: lib/prefix.h modified: lib/sockopt.c modified: lib/stream.c modified: lib/thread.c modified: lib/vty.c modified: lib/zebra.h modified: tests/bgp_capability_test.c modified: tests/bgp_mp_attr_test.c modified: tests/ecommunity_test.c modified: tests/heavy-thread.c modified: tests/heavy-wq.c modified: tests/heavy.c modified: tests/main.c modified: tests/test-checksum.c modified: tests/test-sig.c modified: watchquagga/watchquagga.c modified: zebra/if_netlink.c modified: zebra/ioctl.c modified: zebra/rt_netlink.c modified: zebra/rtread_netlink.c --- lib/if_rmap.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'lib/if_rmap.c') diff --git a/lib/if_rmap.c b/lib/if_rmap.c index dfb66260..9ef5ed94 100644 --- a/lib/if_rmap.c +++ b/lib/if_rmap.c @@ -20,6 +20,7 @@ */ #include +#include "miyagi.h" #include "hash.h" #include "command.h" @@ -63,15 +64,8 @@ if_rmap_lookup (const char *ifname) struct if_rmap key; struct if_rmap *if_rmap; - union { - const char* waxon ; - char* waxoff ; - } miyagi ; - - miyagi.waxon = ifname ; - /* temporary reference */ - key.ifname = miyagi.waxoff ; + key.ifname = miyagi(ifname) ; if_rmap = hash_lookup (ifrmaphash, &key); @@ -107,15 +101,8 @@ if_rmap_get (const char *ifname) { struct if_rmap key; - union { - const char* waxon ; - char* waxoff ; - } miyagi ; - - miyagi.waxon = ifname ; - /* temporary reference */ - key.ifname = miyagi.waxoff ; + key.ifname = miyagi(ifname) ; return (struct if_rmap *) hash_get (ifrmaphash, &key, if_rmap_hash_alloc); } -- cgit v1.2.3