mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 13:27:53 +00:00
bgpd: fix dereference of null pointer in bgp_attr_aspath
The peer pointer theorically have a NULL bgp pointer. This triggers a SA issue. So let us fix it. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
f7b60a3a1f
commit
629d84f512
@ -1633,7 +1633,8 @@ static int bgp_attr_aspath(struct bgp_attr_parser_args *args)
|
||||
* such messages, conformant BGP speakers SHOULD use the "Treat-as-
|
||||
* withdraw" error handling behavior as per [RFC7606].
|
||||
*/
|
||||
if (peer->bgp->reject_as_sets && aspath_check_as_sets(attr->aspath)) {
|
||||
if (peer->bgp && peer->bgp->reject_as_sets &&
|
||||
aspath_check_as_sets(attr->aspath)) {
|
||||
flog_err(EC_BGP_ATTR_MAL_AS_PATH,
|
||||
"AS_SET and AS_CONFED_SET are deprecated from %pBP",
|
||||
peer);
|
||||
|
Loading…
Reference in New Issue
Block a user