aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/hicn/config/controlAddListener.c
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-light/src/hicn/config/controlAddListener.c')
-rw-r--r--hicn-light/src/hicn/config/controlAddListener.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hicn-light/src/hicn/config/controlAddListener.c b/hicn-light/src/hicn/config/controlAddListener.c
index 1a94ff252..d4537b855 100644
--- a/hicn-light/src/hicn/config/controlAddListener.c
+++ b/hicn-light/src/hicn/config/controlAddListener.c
@@ -106,11 +106,10 @@ static CommandReturn _CreateListener(CommandParser *parser, CommandOps *ops,
parcMemory_AllocateAndClear(sizeof(add_listener_command));
// check and set IP address
- if (inet_pton(AF_INET, addr, &addListenerCommand->address.ipv4) == 1) {
+ if (inet_pton(AF_INET, addr, &addListenerCommand->address.v4.as_u32) == 1) {
addListenerCommand->addressType = ADDR_INET;
- } else if (inet_pton(AF_INET6, addr, &addListenerCommand->address.ipv6) ==
- 1) {
+ } else if (inet_pton(AF_INET6, addr, &addListenerCommand->address.v6.as_in6addr) == 1) {
addListenerCommand->addressType = ADDR_INET6;
} else {