Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions lib/bgp/parsebgp_bgp_update.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,12 +796,14 @@ parsebgp_error_t parsebgp_bgp_update_path_attrs_decode(

// Type 29
case PARSEBGP_BGP_PATH_ATTR_TYPE_BGP_LS:
// TODO: add support for BGP-LS
PARSEBGP_SKIP_NOT_IMPLEMENTED(
opts, buf, nread, attr->len,
"BGP UPDATE Path Attribute %d (BGP-LS) is not yet implemented",
attr->type);
slen = attr->len;
PARSEBGP_MAYBE_MALLOC_ZERO(attr->data.bgp_ls);
if ((err = parsebgp_bgp_update_bgp_ls_decode(
opts, attr->data.bgp_ls, buf, &slen, attr->len)) !=
PARSEBGP_OK) {
return err;
}
nread += slen;
buf += slen;
break;

// ...
Expand Down Expand Up @@ -887,7 +889,7 @@ void parsebgp_bgp_update_path_attrs_destroy(
break;

case PARSEBGP_BGP_PATH_ATTR_TYPE_BGP_LS:
// TODO: add support for BGP-LS
parsebgp_bgp_update_bgp_ls_destroy(attr->data.bgp_ls);
break;

case PARSEBGP_BGP_PATH_ATTR_TYPE_LARGE_COMMUNITIES:
Expand Down Expand Up @@ -955,7 +957,7 @@ void parsebgp_bgp_update_path_attrs_clear(parsebgp_bgp_update_path_attrs_t *msg)
break;

case PARSEBGP_BGP_PATH_ATTR_TYPE_BGP_LS:
// TODO: add support for BGP-LS
parsebgp_bgp_update_bgp_ls_clear(attr->data.bgp_ls);
break;

case PARSEBGP_BGP_PATH_ATTR_TYPE_LARGE_COMMUNITIES:
Expand Down Expand Up @@ -1063,7 +1065,7 @@ void parsebgp_bgp_update_path_attrs_dump(parsebgp_bgp_update_path_attrs_t *msg,
break;

case PARSEBGP_BGP_PATH_ATTR_TYPE_BGP_LS:
PARSEBGP_DUMP_INFO(depth, "BGP-LS Support Not Implemented\n");
parsebgp_bgp_update_bgp_ls_dump(attr->data.bgp_ls, depth);
break;

case PARSEBGP_BGP_PATH_ATTR_TYPE_LARGE_COMMUNITIES:
Expand Down
4 changes: 4 additions & 0 deletions lib/bgp/parsebgp_bgp_update.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "parsebgp_bgp_common.h"
#include "parsebgp_bgp_update_ext_communities.h"
#include "parsebgp_bgp_update_mp_reach.h"
#include "parsebgp_bgp_update_bgp_ls.h"
#include "parsebgp_error.h"
#include "parsebgp_opts.h"
#include <inttypes.h>
Expand Down Expand Up @@ -377,6 +378,9 @@ typedef struct parsebgp_bgp_update_path_attr {
/** LARGE COMMUNITIES */
parsebgp_bgp_update_large_communities_t *large_communities;

/** BGP LINK STATE */
parsebgp_bgp_update_bgp_ls_t *bgp_ls;

} data;

} parsebgp_bgp_update_path_attr_t;
Expand Down
Loading