diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-15 10:12:54 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-15 10:12:54 -0700 |
commit | afcf4e97d50c3d7717330eed76a9c3a320b20b6f (patch) | |
tree | 6dc949aeba26e89f4c3a5ad49a68fc5acc0ee386 | |
parent | 0436e57686440f7038437a2dc3c94b4172e28a03 (diff) | |
download | quagga-afcf4e97d50c3d7717330eed76a9c3a320b20b6f.tar.bz2 quagga-afcf4e97d50c3d7717330eed76a9c3a320b20b6f.tar.xz |
BGP make flag action table read-only
This table should be read-only.
Also, comment out some unused code.
-rw-r--r-- | bgpd/bgpd.c | 12 | ||||
-rw-r--r-- | bgpd/bgpd.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 6f44f1fd..58ceef1b 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -1047,7 +1047,7 @@ peer_deactivate (struct peer *peer, afi_t afi, safi_t safi) return 0; } -void +static void peer_nsf_stop (struct peer *peer) { afi_t afi; @@ -2157,7 +2157,7 @@ struct peer_flag_action u_char peer_down; }; -struct peer_flag_action peer_flag_action_list[] = +static const struct peer_flag_action peer_flag_action_list[] = { { PEER_FLAG_PASSIVE, 0, peer_change_reset }, { PEER_FLAG_SHUTDOWN, 0, peer_change_reset }, @@ -2169,7 +2169,7 @@ struct peer_flag_action peer_flag_action_list[] = { 0, 0, 0 } }; -struct peer_flag_action peer_af_flag_action_list[] = +static const struct peer_flag_action peer_af_flag_action_list[] = { { PEER_FLAG_NEXTHOP_SELF, 1, peer_change_reset_out }, { PEER_FLAG_SEND_COMMUNITY, 1, peer_change_reset_out }, @@ -2190,14 +2190,14 @@ struct peer_flag_action peer_af_flag_action_list[] = /* Proper action set. */ static int -peer_flag_action_set (struct peer_flag_action *action_list, int size, +peer_flag_action_set (const struct peer_flag_action *action_list, int size, struct peer_flag_action *action, u_int32_t flag) { int i; int found = 0; int reset_in = 0; int reset_out = 0; - struct peer_flag_action *match = NULL; + const struct peer_flag_action *match = NULL; /* Check peer's frag action. */ for (i = 0; i < size; i++) @@ -2951,12 +2951,14 @@ peer_port_set (struct peer *peer, u_int16_t port) return 0; } +#ifdef unused int peer_port_unset (struct peer *peer) { peer->port = BGP_PORT_DEFAULT; return 0; } +#endif /* neighbor weight. */ int diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index 84164593..1e72b1c9 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -1016,6 +1016,4 @@ extern int peer_maximum_prefix_unset (struct peer *, afi_t, safi_t); extern int peer_clear (struct peer *); extern int peer_clear_soft (struct peer *, afi_t, safi_t, enum bgp_clear_type); -extern void peer_nsf_stop (struct peer *); - #endif /* _QUAGGA_BGPD_H */ |