diff options
Diffstat (limited to 'apps/nshlib/nsh_routecmds.c')
-rw-r--r-- | apps/nshlib/nsh_routecmds.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/apps/nshlib/nsh_routecmds.c b/apps/nshlib/nsh_routecmds.c index 30489332a..3cf27050d 100644 --- a/apps/nshlib/nsh_routecmds.c +++ b/apps/nshlib/nsh_routecmds.c @@ -135,7 +135,7 @@ int cmd_addroute(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) memset(&target, 0, sizeof(target)); #ifdef CONFIG_NET_IPv6 - target.sin_family = AF_INET6; + target.sin6_family = AF_INET6; memcpy(&target.sin6_addr, &inaddr, sizeof(struct in6_addr)); #else target.sin_family = AF_INET; @@ -159,11 +159,11 @@ int cmd_addroute(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) memset(&netmask, 0, sizeof(netmask)); #ifdef CONFIG_NET_IPv6 - netmask.sin_family = AF_INET6; + netmask.sin6_family = AF_INET6; memcpy(&netmask.sin6_addr, &inaddr, sizeof(struct in6_addr)); #else - netmask.sin_family = AF_INET; - netmask.sin_addr = inaddr; + netmask.sin_family = AF_INET; + netmask.sin_addr = inaddr; #endif /* Convert the router IP address string into its binary form */ @@ -183,11 +183,11 @@ int cmd_addroute(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) memset(&router, 0, sizeof(router)); #ifdef CONFIG_NET_IPv6 - router.sin_family = AF_INET6; + router.sin6_family = AF_INET6; memcpy(&router.sin6_addr, &inaddr, sizeof(struct in6_addr)); #else - router.sin_family = AF_INET; - router.sin_addr = inaddr; + router.sin_family = AF_INET; + router.sin_addr = inaddr; #endif /* Then add the route */ @@ -263,11 +263,11 @@ int cmd_delroute(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) memset(&target, 0, sizeof(target)); #ifdef CONFIG_NET_IPv6 - target.sin_family = AF_INET6; + target.sin6_family = AF_INET6; memcpy(&target.sin6_addr, &inaddr, sizeof(struct in6_addr)); #else - target.sin_family = AF_INET; - target.sin_addr = inaddr; + target.sin_family = AF_INET; + target.sin_addr = inaddr; #endif /* Convert the netmask IP address string into its binary form */ @@ -287,11 +287,11 @@ int cmd_delroute(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) memset(&netmask, 0, sizeof(netmask)); #ifdef CONFIG_NET_IPv6 - netmask.sin_family = AF_INET6; + netmask.sin6_family = AF_INET6; memcpy(&netmask.sin6_addr, &inaddr, sizeof(struct in6_addr)); #else - netmask.sin_family = AF_INET; - netmask.sin_addr = inaddr; + netmask.sin_family = AF_INET; + netmask.sin_addr = inaddr; #endif /* Then delete the route */ |