summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul <paul>2005-05-19 01:50:11 +0000
committerpaul <paul>2005-05-19 01:50:11 +0000
commit22db9dec63766cdf6dcd3ecb4b48177fb0e48143 (patch)
tree3de4512bd147a2822c3af46aacc8822ea1083e78
parent2ba9a37add807b1fbd103424b1365fac8fb2b78f (diff)
2005-05-19 Paul Jakma <paul@dishone.st>
* bgp_fsm.c: (bgp_stop) use sockunion_free, not XFREE.. * bgp_network.c: (bgp_getsockname) ditto * bgp_routemap.c: (route_match_peer) ditto, als use a ret value and remove one sockunion_free. * bgpd.c: (peer_delete) ditto
-rw-r--r--bgpd/ChangeLog8
-rw-r--r--bgpd/bgp_fsm.c4
-rw-r--r--bgpd/bgp_network.c4
-rw-r--r--bgpd/bgp_routemap.c16
-rw-r--r--bgpd/bgpd.c4
5 files changed, 22 insertions, 14 deletions
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index 3149f68c..02ca213c 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,11 @@
+2005-05-19 Paul Jakma <paul@dishone.st>
+
+ * bgp_fsm.c: (bgp_stop) use sockunion_free, not XFREE..
+ * bgp_network.c: (bgp_getsockname) ditto
+ * bgp_routemap.c: (route_match_peer) ditto, als use a ret value and
+ remove one sockunion_free.
+ * bgpd.c: (peer_delete) ditto
+
2005-04-11 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* bgp_zebra.c (bgp_redistribute_set, bgp_redistribute_unset):
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index c8ca4173..6368ff47 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -491,13 +491,13 @@ bgp_stop (struct peer *peer)
/* Connection information. */
if (peer->su_local)
{
- XFREE (MTYPE_SOCKUNION, peer->su_local);
+ sockunion_free (peer->su_local);
peer->su_local = NULL;
}
if (peer->su_remote)
{
- XFREE (MTYPE_SOCKUNION, peer->su_remote);
+ sockunion_free (peer->su_remote);
peer->su_remote = NULL;
}
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index e3048687..b2708e7b 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -263,13 +263,13 @@ bgp_getsockname (struct peer *peer)
{
if (peer->su_local)
{
- XFREE (MTYPE_TMP, peer->su_local);
+ sockunion_free (peer->su_local);
peer->su_local = NULL;
}
if (peer->su_remote)
{
- XFREE (MTYPE_TMP, peer->su_remote);
+ sockunion_free (peer->su_remote);
peer->su_remote = NULL;
}
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index 060c68c0..a9de457d 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -124,19 +124,19 @@ route_match_peer (void *rule, struct prefix *prefix, route_map_object_t type,
su2 = sockunion_str2su ("0.0.0.0");
if ( sockunion_same (su, su2) )
{
+ int ret;
if ( CHECK_FLAG (peer->rmap_type, PEER_RMAP_TYPE_NETWORK) ||
CHECK_FLAG (peer->rmap_type, PEER_RMAP_TYPE_REDISTRIBUTE) ||
CHECK_FLAG (peer->rmap_type, PEER_RMAP_TYPE_DEFAULT))
- {
- XFREE (MTYPE_SOCKUNION, su2);
-
- return RMAP_MATCH;
- }
+ ret = RMAP_MATCH;
else
- return RMAP_NOMATCH;
+ ret = RMAP_NOMATCH;
+
+ sockunion_free (su2);
+ return ret;
}
- XFREE (MTYPE_SOCKUNION, su2);
-
+ sockunion_free (su2);
+
if (! CHECK_FLAG (peer->sflags, PEER_STATUS_GROUP))
{
if (sockunion_same (su, &peer->su))
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 0d1689ab..87e6b444 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -1140,9 +1140,9 @@ peer_delete (struct peer *peer)
/* Local and remote addresses. */
if (peer->su_local)
- XFREE (MTYPE_TMP, peer->su_local);
+ sockunion_free (peer->su_local);
if (peer->su_remote)
- XFREE (MTYPE_TMP, peer->su_remote);
+ sockunion_free (peer->su_remote);
/* Peer description string. */
if (peer->desc)