diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-05-12 09:28:43 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-05-12 11:48:02 -0300 |
| commit | 9ff63e6f55a8a66509dc917482f702faa1574fbd (patch) | |
| tree | fb0093902efbc3e9047778f74fb3d51836dbd6bf | |
| parent | 5143a87b92fc635b05586d4a95a6e22e2cbfc397 (diff) | |
bgpd: removed unused parameter from bgp_dump_attr()
Originally we used the 'peer' parameter for this:
if (peer_sort (peer) == BGP_PEER_IBGP)
snprintf (buf + strlen (buf), size - strlen (buf), ", localpref %d",
attr->local_pref);
Now we have this:
if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_LOCAL_PREF)))
snprintf (buf + strlen (buf), size - strlen (buf), ", localpref %u",
attr->local_pref);
Remove the now useless 'peer' parameter.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| -rw-r--r-- | bgpd/bgp_debug.c | 2 | ||||
| -rw-r--r-- | bgpd/bgp_debug.h | 2 | ||||
| -rw-r--r-- | bgpd/bgp_packet.c | 2 | ||||
| -rw-r--r-- | bgpd/bgp_updgrp_packet.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 0bd74dbdc4..55cd7edd83 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -383,7 +383,7 @@ bgp_debug_peer_updout_enabled(char *host) /* Dump attribute. */ int -bgp_dump_attr (struct peer *peer, struct attr *attr, char *buf, size_t size) +bgp_dump_attr (struct attr *attr, char *buf, size_t size) { if (! attr) return 0; diff --git a/bgpd/bgp_debug.h b/bgpd/bgp_debug.h index 0968568225..64f087a68e 100644 --- a/bgpd/bgp_debug.h +++ b/bgpd/bgp_debug.h @@ -138,7 +138,7 @@ struct bgp_debug_filter extern const char *bgp_type_str[]; -extern int bgp_dump_attr (struct peer *, struct attr *, char *, size_t); +extern int bgp_dump_attr (struct attr *, char *, size_t); extern int bgp_debug_peer_updout_enabled(char *host); extern const char *bgp_notify_code_str(char); extern const char *bgp_notify_subcode_str(char, char); diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 0800dd74ba..b5a03f2692 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -1493,7 +1493,7 @@ bgp_update_receive (struct peer *peer, bgp_size_t size) BGP_DEBUG (update, UPDATE_IN) || BGP_DEBUG (update, UPDATE_PREFIX)) { - ret = bgp_dump_attr (peer, &attr, peer->rcvd_attr_str, BUFSIZ); + ret = bgp_dump_attr (&attr, peer->rcvd_attr_str, BUFSIZ); if (attr_parse_ret == BGP_ATTR_PARSE_WITHDRAW) zlog_err ("%s rcvd UPDATE with errors in attr(s)!! Withdrawing route.", diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index 9be1a50db7..4ef436acb1 100644 --- a/bgpd/bgp_updgrp_packet.c +++ b/bgpd/bgp_updgrp_packet.c @@ -749,7 +749,7 @@ subgroup_update_packet (struct update_subgroup *subgrp) { memset (send_attr_str, 0, BUFSIZ); send_attr_printed = 0; - bgp_dump_attr (peer, adv->baa->attr, send_attr_str, BUFSIZ); + bgp_dump_attr (adv->baa->attr, send_attr_str, BUFSIZ); } } @@ -1043,7 +1043,7 @@ subgroup_default_update_packet (struct update_subgroup *subgrp, char tx_id_buf[30]; attrstr[0] = '\0'; - bgp_dump_attr (peer, attr, attrstr, BUFSIZ); + bgp_dump_attr (attr, attrstr, BUFSIZ); bgp_info_addpath_tx_str (addpath_encode, BGP_ADDPATH_TX_ID_FOR_DEFAULT_ORIGINATE, tx_id_buf); zlog_debug ("u%" PRIu64 ":s%" PRIu64 " send UPDATE %s%s %s", (SUBGRP_UPDGRP (subgrp))->id, subgrp->id, |
