aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2023-01-20 09:37:24 +0000
committerMauro Sardara <msardara@cisco.com>2023-01-20 10:19:28 +0000
commita465d503193cc75052aa5acb9babfdd369cda90c (patch)
tree249051f991870c5a20295eaf3e758b34b1dd8a62 /ctrl
parentce8807815b2e9c6630f639e8dc6924f0eff74775 (diff)
fix(libhicnctrl)/hicn_plugin): copy address to correct offset
Copy address received from vapi into correct ip46address offset Ticket: HICN-826 Change-Id: I1bf23cc0920539f8883b499981f216038e51a8c0 Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'ctrl')
-rw-r--r--ctrl/libhicnctrl/src/modules/hicn_plugin/listener.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctrl/libhicnctrl/src/modules/hicn_plugin/listener.c b/ctrl/libhicnctrl/src/modules/hicn_plugin/listener.c
index 0e9c5406d..4d9792256 100644
--- a/ctrl/libhicnctrl/src/modules/hicn_plugin/listener.c
+++ b/ctrl/libhicnctrl/src/modules/hicn_plugin/listener.c
@@ -44,11 +44,11 @@ static vapi_error_e process_ip_info(struct vapi_ctx_s *ctx, void *callback_ctx,
struct listener_data_s *ld = (struct listener_data_s *)callback_ctx;
if (reply->prefix.address.af == ADDRESS_IP4) {
- memcpy(&(ld->listener.local_addr), reply->prefix.address.un.ip4,
+ memcpy(&(ld->listener.local_addr.v4), reply->prefix.address.un.ip4,
IPV4_ADDR_LEN);
ld->listener.family = AF_INET;
} else {
- memcpy(&(ld->listener.local_addr), reply->prefix.address.un.ip6,
+ memcpy(&(ld->listener.local_addr.v6), reply->prefix.address.un.ip6,
IPV6_ADDR_LEN);
ld->listener.family = AF_INET6;
}