diff options
-rw-r--r-- | apps/nshlib/nsh_parse.c | 2 | ||||
-rw-r--r-- | nuttx/net/net_delroute.c | 2 | ||||
-rw-r--r-- | nuttx/net/netdev_ioctl.c | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/apps/nshlib/nsh_parse.c b/apps/nshlib/nsh_parse.c index 4d3c066c1..b293f4983 100644 --- a/apps/nshlib/nsh_parse.c +++ b/apps/nshlib/nsh_parse.c @@ -193,7 +193,7 @@ static const struct cmdmap_s g_cmdmap[] = # endif #if defined(CONFIG_NET) && defined(CONFIG_NET_ROUTE) && !defined(CONFIG_NSH_DISABLE_DELROUTE) - { "delroute", cmd_addroute, 3, 3, "<target> <netmask>" }, + { "delroute", cmd_delroute, 3, 3, "<target> <netmask>" }, #endif #if CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT) && \ diff --git a/nuttx/net/net_delroute.c b/nuttx/net/net_delroute.c index e10dbfd48..50c978a88 100644 --- a/nuttx/net/net_delroute.c +++ b/nuttx/net/net_delroute.c @@ -87,7 +87,7 @@ static int net_match(FAR struct net_route_s *route, FAR void *arg) */ if (uip_ipaddr_maskcmp(route->target, match->target, match->netmask) && - uip_ipaddr_cmp(route->target, match->netmask)) + uip_ipaddr_cmp(route->netmask, match->netmask)) { /* They match.. Remove the entry from the routing table */ diff --git a/nuttx/net/netdev_ioctl.c b/nuttx/net/netdev_ioctl.c index 25961a812..ff94ed5c2 100644 --- a/nuttx/net/netdev_ioctl.c +++ b/nuttx/net/netdev_ioctl.c @@ -645,16 +645,16 @@ static int netdev_rtioctl(FAR struct socket *psock, int cmd, } #ifdef CONFIG_NET_IPv6 - addr = (FAR struct sockaddr_in6 *)&rtentry->rt_target; + addr = (FAR struct sockaddr_in6 *)rtentry->rt_target; target = (uip_ipaddr_t)addr->sin6_addr.u6_addr16; - addr = (FAR struct sockaddr_in6 *)&rtentry->rt_netmask; + addr = (FAR struct sockaddr_in6 *)rtentry->rt_netmask; netmask = (uip_ipaddr_t)addr->sin6_addr.u6_addr16; #else - addr = (FAR struct sockaddr_in *)&rtentry->rt_target; + addr = (FAR struct sockaddr_in *)rtentry->rt_target; target = (uip_ipaddr_t)addr->sin_addr.s_addr; - addr = (FAR struct sockaddr_in *)&rtentry->rt_netmask; + addr = (FAR struct sockaddr_in *)rtentry->rt_netmask; netmask = (uip_ipaddr_t)addr->sin_addr.s_addr; #endif ret = net_delroute(target, netmask); |