diff options
author | Hiroki Shirokura <slank.dev@gmail.com> | 2020-02-04 07:56:40 +0100 |
---|---|---|
committer | Hiroki Shirokura <slank.dev@gmail.com> | 2020-02-14 01:13:43 +0100 |
commit | 45a06b11a686054cf885f61795a71081dafac9c5 (patch) | |
tree | 25abdc96cb0531e759057ebbeac20b7d5bb304f3 | |
parent | bgpd: fix Prefix-SID parsing failure case (diff) | |
download | frr-45a06b11a686054cf885f61795a71081dafac9c5.tar.xz frr-45a06b11a686054cf885f61795a71081dafac9c5.zip |
bgpd: refactor func prototype arround Prefix-SID
mp_update value isn't used by the function arround Prefix-SID.
Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
-rw-r--r-- | bgpd/bgp_attr.c | 10 | ||||
-rw-r--r-- | bgpd/bgp_attr.h | 3 | ||||
-rw-r--r-- | tests/bgpd/test_mp_attr.c | 2 |
3 files changed, 6 insertions, 9 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 316cc957c..1cad9e676 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -2343,8 +2343,7 @@ static int bgp_attr_encap(uint8_t type, struct peer *peer, /* IN */ * Returns 0 if there was an error that needs to be passed up the stack */ static bgp_attr_parse_ret_t bgp_attr_psid_sub(uint8_t type, uint16_t length, - struct bgp_attr_parser_args *args, - struct bgp_nlri *mp_update) + struct bgp_attr_parser_args *args) { struct peer *const peer = args->peer; struct attr *const attr = args->attr; @@ -2569,8 +2568,7 @@ static bgp_attr_parse_ret_t bgp_attr_psid_sub(uint8_t type, uint16_t length, /* Prefix SID attribute * draft-ietf-idr-bgp-prefix-sid-05 */ -bgp_attr_parse_ret_t bgp_attr_prefix_sid(struct bgp_attr_parser_args *args, - struct bgp_nlri *mp_update) +bgp_attr_parse_ret_t bgp_attr_prefix_sid(struct bgp_attr_parser_args *args) { struct peer *const peer = args->peer; struct attr *const attr = args->attr; @@ -2610,7 +2608,7 @@ bgp_attr_parse_ret_t bgp_attr_prefix_sid(struct bgp_attr_parser_args *args, args->total); } - ret = bgp_attr_psid_sub(type, length, args, mp_update); + ret = bgp_attr_psid_sub(type, length, args); if (ret != BGP_ATTR_PARSE_PROCEED) return ret; @@ -3022,7 +3020,7 @@ bgp_attr_parse_ret_t bgp_attr_parse(struct peer *peer, struct attr *attr, startp); break; case BGP_ATTR_PREFIX_SID: - ret = bgp_attr_prefix_sid(&attr_args, mp_update); + ret = bgp_attr_prefix_sid(&attr_args); break; case BGP_ATTR_PMSI_TUNNEL: ret = bgp_attr_pmsi_tunnel(&attr_args); diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h index 2e91f56df..1c519c67f 100644 --- a/bgpd/bgp_attr.h +++ b/bgpd/bgp_attr.h @@ -351,8 +351,7 @@ extern int bgp_mp_reach_parse(struct bgp_attr_parser_args *args, extern int bgp_mp_unreach_parse(struct bgp_attr_parser_args *args, struct bgp_nlri *); extern bgp_attr_parse_ret_t -bgp_attr_prefix_sid(struct bgp_attr_parser_args *args, - struct bgp_nlri *mp_update); +bgp_attr_prefix_sid(struct bgp_attr_parser_args *args); extern struct bgp_attr_encap_subtlv * encap_tlv_dup(struct bgp_attr_encap_subtlv *orig); diff --git a/tests/bgpd/test_mp_attr.c b/tests/bgpd/test_mp_attr.c index c97ea5715..d46dd8864 100644 --- a/tests/bgpd/test_mp_attr.c +++ b/tests/bgpd/test_mp_attr.c @@ -1027,7 +1027,7 @@ static void parse_test(struct peer *peer, struct test_segment *t, int type) parse_ret = bgp_mp_unreach_parse(&attr_args, &nlri); break; case BGP_ATTR_PREFIX_SID: - parse_ret = bgp_attr_prefix_sid(&attr_args, &nlri); + parse_ret = bgp_attr_prefix_sid(&attr_args); break; default: printf("unknown type"); |