mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 11:18:43 +00:00
Merge pull request #16713 from opensourcerouting/fix/bgpd_parse_received_err
bgpd: Print errors as error not as information when parsing OPEN message
This commit is contained in:
commit
1e32a3098c
@ -1374,7 +1374,7 @@ int bgp_open_option_parse(struct peer *peer, uint16_t length,
|
|||||||
* Check that we can read the opt_type and fetch it
|
* Check that we can read the opt_type and fetch it
|
||||||
*/
|
*/
|
||||||
if (STREAM_READABLE(s) < 1) {
|
if (STREAM_READABLE(s) < 1) {
|
||||||
zlog_info("%s Option length error", peer->host);
|
zlog_err("%s Option length error", peer->host);
|
||||||
bgp_notify_send(peer->connection, BGP_NOTIFY_OPEN_ERR,
|
bgp_notify_send(peer->connection, BGP_NOTIFY_OPEN_ERR,
|
||||||
BGP_NOTIFY_OPEN_MALFORMED_ATTR);
|
BGP_NOTIFY_OPEN_MALFORMED_ATTR);
|
||||||
return -1;
|
return -1;
|
||||||
@ -1387,7 +1387,7 @@ int bgp_open_option_parse(struct peer *peer, uint16_t length,
|
|||||||
*/
|
*/
|
||||||
if (BGP_OPEN_EXT_OPT_PARAMS_CAPABLE(peer)) {
|
if (BGP_OPEN_EXT_OPT_PARAMS_CAPABLE(peer)) {
|
||||||
if (STREAM_READABLE(s) < 2) {
|
if (STREAM_READABLE(s) < 2) {
|
||||||
zlog_info("%s Option length error", peer->host);
|
zlog_err("%s Option length error", peer->host);
|
||||||
bgp_notify_send(peer->connection,
|
bgp_notify_send(peer->connection,
|
||||||
BGP_NOTIFY_OPEN_ERR,
|
BGP_NOTIFY_OPEN_ERR,
|
||||||
BGP_NOTIFY_OPEN_MALFORMED_ATTR);
|
BGP_NOTIFY_OPEN_MALFORMED_ATTR);
|
||||||
@ -1397,7 +1397,7 @@ int bgp_open_option_parse(struct peer *peer, uint16_t length,
|
|||||||
opt_length = stream_getw(s);
|
opt_length = stream_getw(s);
|
||||||
} else {
|
} else {
|
||||||
if (STREAM_READABLE(s) < 1) {
|
if (STREAM_READABLE(s) < 1) {
|
||||||
zlog_info("%s Option length error", peer->host);
|
zlog_err("%s Option length error", peer->host);
|
||||||
bgp_notify_send(peer->connection,
|
bgp_notify_send(peer->connection,
|
||||||
BGP_NOTIFY_OPEN_ERR,
|
BGP_NOTIFY_OPEN_ERR,
|
||||||
BGP_NOTIFY_OPEN_MALFORMED_ATTR);
|
BGP_NOTIFY_OPEN_MALFORMED_ATTR);
|
||||||
@ -1409,8 +1409,8 @@ int bgp_open_option_parse(struct peer *peer, uint16_t length,
|
|||||||
|
|
||||||
/* Option length check. */
|
/* Option length check. */
|
||||||
if (STREAM_READABLE(s) < opt_length) {
|
if (STREAM_READABLE(s) < opt_length) {
|
||||||
zlog_info("%s Option length error (%d)", peer->host,
|
zlog_err("%s Option length error (%d)", peer->host,
|
||||||
opt_length);
|
opt_length);
|
||||||
bgp_notify_send(peer->connection, BGP_NOTIFY_OPEN_ERR,
|
bgp_notify_send(peer->connection, BGP_NOTIFY_OPEN_ERR,
|
||||||
BGP_NOTIFY_OPEN_MALFORMED_ATTR);
|
BGP_NOTIFY_OPEN_MALFORMED_ATTR);
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user