mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 12:09:22 +00:00
bgpd: Do not send notification twice when parsing NLRI labels
This is already handled in bgp_nlri_parse() by checking error code. Even more, we should send error sub-code to be according the NLRI type. If it's MP_UPDATE/MP_WITHDRAW, sub-code should be an Optional Attribute error. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
e618cc7b21
commit
bfeb86dfa8
@ -388,8 +388,6 @@ int bgp_nlri_parse_label(struct peer *peer, struct attr *attr,
|
||||
EC_BGP_UPDATE_RCV,
|
||||
"%s [Error] Update packet error (wrong label length 0)",
|
||||
peer->host);
|
||||
bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
|
||||
BGP_NOTIFY_UPDATE_INVAL_NETWORK);
|
||||
return BGP_NLRI_PARSE_ERROR_LABEL_LENGTH;
|
||||
}
|
||||
p.prefixlen = prefixlen - BSIZE(llen);
|
||||
@ -399,8 +397,6 @@ int bgp_nlri_parse_label(struct peer *peer, struct attr *attr,
|
||||
flog_err(EC_BGP_UPDATE_RCV,
|
||||
"%s [Error] Update packet error (wrong label length %d)",
|
||||
peer->host, prefixlen);
|
||||
bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
|
||||
BGP_NOTIFY_UPDATE_INVAL_NETWORK);
|
||||
return BGP_NLRI_PARSE_ERROR_LABEL_LENGTH;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user