Merge pull request #17106 from louis-6wind/fix-bmp-converity

bgpd: fix bmp coverity issue 1600779
This commit is contained in:
Russ White 2024-10-15 11:55:42 -04:00 committed by GitHub
commit 0aef4e4041
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -489,7 +489,7 @@ static struct stream *bmp_peerstate(struct peer *peer, bool down)
&uptime_real);
/* Local Address (16 bytes) */
if (!peer->su_local || is_locrib)
if (is_locrib)
stream_put(s, 0, 16);
else if (peer->su_local->sa.sa_family == AF_INET6)
stream_put(s, &peer->su_local->sin6.sin6_addr, 16);