aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-11-15 08:58:23 +0000
committerAlberto Compagno <acompagn+fdio@cisco.com>2019-11-20 07:58:12 +0000
commit4eb89ea4dcad4c01664b5331745f4e9a38facbd2 (patch)
treef4c6935249f6461a03886ab89532e5563db1f75f /lib
parent40fde5ad542c30e59ac02639e29389085de89de5 (diff)
[HICN-394] Add route commands add, list, del for the hicn-plugin
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com> Change-Id: I41641f6d27babaa1c413ecf2fe6eae0e499df97d
Diffstat (limited to 'lib')
-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 8bbb2bf5d..49818de40 100644
--- a/lib/src/util/ip_address.c
+++ b/lib/src/util/ip_address.c
@@ -142,12 +142,12 @@ ip_address_snprintf(char * s, size_t size, const ip_address_t * ip_address, int
const char * rc;
switch(family) {
case AF_INET:
- if (size <= INET_ADDRSTRLEN)
+ if (size < INET_ADDRSTRLEN)
return -1;
rc = inet_ntop (AF_INET, ip_address->v4.buffer, s, INET_ADDRSTRLEN);
break;
case AF_INET6:
- if (size <= INET6_ADDRSTRLEN)
+ if (size < INET6_ADDRSTRLEN)
return -1;
rc = inet_ntop (AF_INET6, ip_address->v6.buffer, s, INET6_ADDRSTRLEN);
break;