mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-28 15:36:25 +00:00
bgpd: bmp fix peer-up ports byte order
added htons to ports in the peer-up message to fix byte order Signed-off-by: Maxence Younsi <mx.yns@outlook.fr>
This commit is contained in:
parent
bdf62ec61b
commit
9e681c84fa
@ -389,13 +389,13 @@ static struct stream *bmp_peerstate(struct peer *peer, bool down)
|
||||
|
||||
/* Local Port, Remote Port */
|
||||
if (peer->su_local->sa.sa_family == AF_INET6)
|
||||
stream_putw(s, peer->su_local->sin6.sin6_port);
|
||||
stream_putw(s, htons(peer->su_local->sin6.sin6_port));
|
||||
else if (peer->su_local->sa.sa_family == AF_INET)
|
||||
stream_putw(s, peer->su_local->sin.sin_port);
|
||||
stream_putw(s, htons(peer->su_local->sin.sin_port));
|
||||
if (peer->su_remote->sa.sa_family == AF_INET6)
|
||||
stream_putw(s, peer->su_remote->sin6.sin6_port);
|
||||
stream_putw(s, htons(peer->su_remote->sin6.sin6_port));
|
||||
else if (peer->su_remote->sa.sa_family == AF_INET)
|
||||
stream_putw(s, peer->su_remote->sin.sin_port);
|
||||
stream_putw(s, htons(peer->su_remote->sin.sin_port));
|
||||
|
||||
static const uint8_t dummy_open[] = {
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
|
Loading…
Reference in New Issue
Block a user