diff options
Diffstat (limited to 'bgpd/bgp_bmp.c')
| -rw-r--r-- | bgpd/bgp_bmp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c index 08f8b8b734..59efb35235 100644 --- a/bgpd/bgp_bmp.c +++ b/bgpd/bgp_bmp.c @@ -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); @@ -501,14 +501,14 @@ static struct stream *bmp_peerstate(struct peer *peer, bool down) } /* Local Port, Remote Port */ - if (is_locrib) + if (!peer->su_local || is_locrib) stream_putw(s, 0); else if (peer->su_local->sa.sa_family == AF_INET6) stream_putw(s, htons(peer->su_local->sin6.sin6_port)); else if (peer->su_local->sa.sa_family == AF_INET) stream_putw(s, htons(peer->su_local->sin.sin_port)); - if (is_locrib) + if (!peer->su_remote || is_locrib) stream_putw(s, 0); else if (peer->su_remote->sa.sa_family == AF_INET6) stream_putw(s, htons(peer->su_remote->sin6.sin6_port)); |
