From a465d503193cc75052aa5acb9babfdd369cda90c Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Fri, 20 Jan 2023 09:37:24 +0000 Subject: 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 --- ctrl/libhicnctrl/src/modules/hicn_plugin/listener.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ctrl') 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; } -- cgit 1.2.3-korg