diff options
| author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-03-19 17:22:58 -0300 |
|---|---|---|
| committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-03-19 17:22:58 -0300 |
| commit | 5ff7d1be75ab685a93e797569b5cf11a748c5890 (patch) | |
| tree | f00f223e9dfbaeff39f65111f51898006f66daf7 | |
| parent | 548ec776edc4c10518a98f273eded645ab471d27 (diff) | |
bfdd: fix JSON API local-address translation
Get the local-address from the right key struct member.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
| -rw-r--r-- | bfdd/bfd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c index c8adf82a83..08e8e06580 100644 --- a/bfdd/bfd.c +++ b/bfdd/bfd.c @@ -1231,7 +1231,7 @@ void bs_to_bpc(struct bfd_session *bs, struct bfd_peer_cfg *bpc) if (memcmp(&bs->key.local, &zero_addr, sizeof(bs->key.local))) { bpc->bpc_local.sa_sin.sin_family = AF_INET6; - memcpy(&bpc->bpc_local.sa_sin.sin_addr, &bs->key.peer, + memcpy(&bpc->bpc_local.sa_sin.sin_addr, &bs->key.local, sizeof(bpc->bpc_local.sa_sin.sin_addr)); } break; @@ -1242,7 +1242,7 @@ void bs_to_bpc(struct bfd_session *bs, struct bfd_peer_cfg *bpc) sizeof(bpc->bpc_peer.sa_sin6.sin6_addr)); bpc->bpc_local.sa_sin6.sin6_family = AF_INET6; - memcpy(&bpc->bpc_local.sa_sin6.sin6_addr, &bs->key.peer, + memcpy(&bpc->bpc_local.sa_sin6.sin6_addr, &bs->key.local, sizeof(bpc->bpc_local.sa_sin6.sin6_addr)); break; } |
