Fix some delroute errors

This commit is contained in:
Gregory Nutt 2013-10-05 10:34:38 -06:00
parent 4579819f8e
commit 17e481e35a
2 changed files with 5 additions and 5 deletions

View File

@ -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 */

View File

@ -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);