From 1bf749aa3e4b0ccc40057b2587af5211926a1431 Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Thu, 7 Nov 2019 16:42:01 +0100 Subject: [HICN-385] fix route removal in hicnctrl, code uniformization in hicn-light control api MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id097368dcde993775f206623195cc5aa57b4fe12 Signed-off-by: Jordan Augé --- hicn-light/src/hicn/config/controlRemoveRoute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hicn-light/src/hicn/config/controlRemoveRoute.c') diff --git a/hicn-light/src/hicn/config/controlRemoveRoute.c b/hicn-light/src/hicn/config/controlRemoveRoute.c index 0626886de..0f46211c1 100644 --- a/hicn-light/src/hicn/config/controlRemoveRoute.c +++ b/hicn-light/src/hicn/config/controlRemoveRoute.c @@ -104,7 +104,7 @@ static CommandReturn _controlRemoveRoute_Execute(CommandParser *parser, parcMemory_AllocateAndClear(sizeof(remove_route_command)); // check and set IP address - if (inet_pton(AF_INET, addr, &removeRouteCommand->address.ipv4) == 1) { + if (inet_pton(AF_INET, addr, &removeRouteCommand->address.v4.as_u32) == 1) { if (len > 32) { printf("ERROR: exceeded INET mask length, max=32\n"); parcMemory_Deallocate(&removeRouteCommand); @@ -112,7 +112,7 @@ static CommandReturn _controlRemoveRoute_Execute(CommandParser *parser, return CommandReturn_Failure; } removeRouteCommand->addressType = ADDR_INET; - } else if (inet_pton(AF_INET6, addr, &removeRouteCommand->address.ipv6) == + } else if (inet_pton(AF_INET6, addr, &removeRouteCommand->address.v6.as_in6addr) == 1) { if (len > 128) { printf("ERROR: exceeded INET6 mask length, max=128\n"); -- cgit 1.2.3-korg