diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-08-22 09:48:32 +0200 |
---|---|---|
committer | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-11-04 18:10:09 +0100 |
commit | ccf813e13eba7b5c71cc3090582f50f25ba7b721 (patch) | |
tree | 2316f2d00a2c6fa8dc5c4195386cf9554cc49726 /libtransport/src/hicn/transport/core/raw_socket_interface.cc | |
parent | 6b7f4c3f9d9d26a5aa71be8f5976956aff387e8f (diff) |
[HICN-262] Fix binary api to prevent byteswapping of ip addresses in vapi
Change-Id: If3f9a7db1e1310fdc08d1003b28e5e1d4006b61e
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'libtransport/src/hicn/transport/core/raw_socket_interface.cc')
-rw-r--r-- | libtransport/src/hicn/transport/core/raw_socket_interface.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libtransport/src/hicn/transport/core/raw_socket_interface.cc b/libtransport/src/hicn/transport/core/raw_socket_interface.cc index ef365fce7..bb4e083e1 100644 --- a/libtransport/src/hicn/transport/core/raw_socket_interface.cc +++ b/libtransport/src/hicn/transport/core/raw_socket_interface.cc @@ -43,9 +43,8 @@ void RawSocketInterface::connect(bool is_consumer) { // Get interface ip address struct sockaddr_in6 address = {0}; utils::retrieveInterfaceAddress(output_interface_, &address); - inet6_address_.family = address.sin6_family; - std::memcpy(inet6_address_.address.buffer, &address.sin6_addr, + std::memcpy(&inet6_address_.v6.as_u8, &address.sin6_addr, sizeof(address.sin6_addr)); connector_.connect(output_interface_, remote_mac_address_); } |