aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/hicn/config/controlAddRoute.c
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-light/src/hicn/config/controlAddRoute.c')
-rw-r--r--hicn-light/src/hicn/config/controlAddRoute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hicn-light/src/hicn/config/controlAddRoute.c b/hicn-light/src/hicn/config/controlAddRoute.c
index 086cf3a2b..8a1adf6d6 100644
--- a/hicn-light/src/hicn/config/controlAddRoute.c
+++ b/hicn-light/src/hicn/config/controlAddRoute.c
@@ -113,7 +113,7 @@ static CommandReturn _controlAddRoute_Execute(CommandParser *parser,
parcMemory_AllocateAndClear(sizeof(add_route_command));
// check and set IP address
- if (inet_pton(AF_INET, addr, &addRouteCommand->address.ipv4) == 1) {
+ if (inet_pton(AF_INET, addr, &addRouteCommand->address.v4.as_u32) == 1) {
if (len > 32) {
printf("ERROR: exceeded INET mask length, max=32\n");
parcMemory_Deallocate(&addRouteCommand);
@@ -121,7 +121,7 @@ static CommandReturn _controlAddRoute_Execute(CommandParser *parser,
return CommandReturn_Failure;
}
addRouteCommand->addressType = ADDR_INET;
- } else if (inet_pton(AF_INET6, addr, &addRouteCommand->address.ipv6) == 1) {
+ } else if (inet_pton(AF_INET6, addr, &addRouteCommand->address.v6.as_in6addr) == 1) {
if (len > 128) {
printf("ERROR: exceeded INET6 mask length, max=128\n");
parcMemory_Deallocate(&addRouteCommand);