diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-02-06 13:34:19 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-02-06 13:34:19 -0600 |
commit | efccc9d98731da0d60a9c6b9094ea4c93f486723 (patch) | |
tree | b53ad16ae665ac512a97240cf43f843150684e06 /nuttx | |
parent | a9d48ad618e638a34a809de0624aff03450ba211 (diff) | |
download | px4-nuttx-efccc9d98731da0d60a9c6b9094ea4c93f486723.tar.gz px4-nuttx-efccc9d98731da0d60a9c6b9094ea4c93f486723.tar.bz2 px4-nuttx-efccc9d98731da0d60a9c6b9094ea4c93f486723.zip |
Networking: Fix some errors that crept in with IPv6
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/net/netdev/netdev_ioctl.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nuttx/net/netdev/netdev_ioctl.c b/nuttx/net/netdev/netdev_ioctl.c index 5eae3b816..c06c618d0 100644 --- a/nuttx/net/netdev/netdev_ioctl.c +++ b/nuttx/net/netdev/netdev_ioctl.c @@ -846,28 +846,28 @@ static int netdev_rtioctl(FAR struct socket *psock, int cmd, { /* The target address and the netmask are required values */ - if (!retentry || !rtentry->rt_target || !rtentry->rt_netmask) + if (!rtentry || !rtentry->rt_target || !rtentry->rt_netmask) { return -EINVAL; } #ifdef CONFIG_NET_IPv4 - if (rtentry->rt_target.ss_family == AF_INET) #ifdef CONFIG_NET_IPv6 + if (rtentry->rt_target->ss_family == AF_INET) #endif { ret = ioctl_addipv4route(rtentry); } #endif /* CONFIG_NET_IPv4 */ -#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv6 +#ifdef CONFIG_NET_IPv4 else #endif { ret = ioctl_addipv6route(rtentry); } -#endif /* CONFIG_NET_IPv4 */ +#endif /* CONFIG_NET_IPv6 */ } break; @@ -875,28 +875,28 @@ static int netdev_rtioctl(FAR struct socket *psock, int cmd, { /* The target address and the netmask are required values */ - if (!retentry || !rtentry->rt_target || !rtentry->rt_netmask) + if (!rtentry || !rtentry->rt_target || !rtentry->rt_netmask) { return -EINVAL; } #ifdef CONFIG_NET_IPv4 - if (rtentry->rt_target.ss_family == AF_INET) #ifdef CONFIG_NET_IPv6 + if (rtentry->rt_target->ss_family == AF_INET) #endif { ret = ioctl_delipv4route(rtentry); } #endif /* CONFIG_NET_IPv4 */ -#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv6 +#ifdef CONFIG_NET_IPv4 else #endif { ret = ioctl_delipv6route(rtentry); } -#endif /* CONFIG_NET_IPv4 */ +#endif /* CONFIG_NET_IPv6 */ } break; |