summaryrefslogtreecommitdiffstats
path: root/lib/src/util
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-08-22 09:48:32 +0200
committerAlberto Compagno <acompagn+fdio@cisco.com>2019-11-04 18:10:09 +0100
commitccf813e13eba7b5c71cc3090582f50f25ba7b721 (patch)
tree2316f2d00a2c6fa8dc5c4195386cf9554cc49726 /lib/src/util
parent6b7f4c3f9d9d26a5aa71be8f5976956aff387e8f (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 'lib/src/util')
-rw-r--r--lib/src/util/ip_address.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/src/util/ip_address.c b/lib/src/util/ip_address.c
index c54b1fae6..d4fbcaae6 100644
--- a/lib/src/util/ip_address.c
+++ b/lib/src/util/ip_address.c
@@ -77,7 +77,7 @@ ip_address_get_family (const char * ip_address)
}
int
-ip_address_len (const ip_address_t * ip_address, int family)
+ip_address_len (int family)
{
return (family == AF_INET6) ? IPV6_ADDR_LEN :
(family == AF_INET) ? IPV4_ADDR_LEN : 0;
@@ -165,7 +165,7 @@ ip_address_to_sockaddr(const ip_address_t * ip_address,
int
ip_address_cmp(const ip_address_t * ip1, const ip_address_t * ip2, int family)
{
- return memcmp(ip1, ip2, ip_address_len(ip1, family));
+ return memcmp(ip1, ip2, ip_address_len(family));
}
int