diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-03-24 09:34:17 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-03-24 09:34:17 -0600 |
commit | 9c43f66fc25286196f9ce520489b80c891e9199a (patch) | |
tree | 6ac1e3f065bc629bdaf09febdec5d6efe687ede1 /nuttx/net | |
parent | 9c5218976bd64888b9aeaabd5ca2e91af9b93bd0 (diff) | |
download | px4-nuttx-9c43f66fc25286196f9ce520489b80c891e9199a.tar.gz px4-nuttx-9c43f66fc25286196f9ce520489b80c891e9199a.tar.bz2 px4-nuttx-9c43f66fc25286196f9ce520489b80c891e9199a.zip |
net/: IGMP-related bugfixes from Manuel Stühn
Diffstat (limited to 'nuttx/net')
-rw-r--r-- | nuttx/net/netdev_ioctl.c | 4 | ||||
-rw-r--r-- | nuttx/net/uip/uip_input.c | 13 |
2 files changed, 12 insertions, 5 deletions
diff --git a/nuttx/net/netdev_ioctl.c b/nuttx/net/netdev_ioctl.c index a8394edb2..c37c04611 100644 --- a/nuttx/net/netdev_ioctl.c +++ b/nuttx/net/netdev_ioctl.c @@ -472,7 +472,7 @@ static FAR struct uip_driver_s *netdev_imsfdev(FAR struct ip_msfilter *imsf) * psock Socket structure * dev Ethernet driver device structure * cmd The ioctl command - * imsf The argument of the ioctl cmd + * imsf The argument of the ioctl cmd * * Return: * >=0 on success (positive non-zero values are cmd-specific) @@ -495,7 +495,7 @@ static int netdev_imsfioctl(FAR struct socket *psock, int cmd, { case SIOCSIPMSFILTER: /* Set source filter content */ { - dev = netdev_imsfdev(req); + dev = netdev_imsfdev(imsf); if (dev) { if (imsf->imsf_fmode == MCAST_INCLUDE) diff --git a/nuttx/net/uip/uip_input.c b/nuttx/net/uip/uip_input.c index 3dffcf062..9411e3cc4 100644 --- a/nuttx/net/uip/uip_input.c +++ b/nuttx/net/uip/uip_input.c @@ -2,7 +2,7 @@ * netuip/uip_input.c * The uIP TCP/IP stack code. * - * Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Adapted for NuttX from logic in uIP which also has a BSD-like license: @@ -453,11 +453,18 @@ int uip_input(struct uip_driver_s *dev) #ifndef CONFIG_NET_IPv6 if (!uip_ipaddr_cmp(uip_ip4addr_conv(pbuf->destipaddr), dev->d_ipaddr)) { +#ifdef CONFIG_NET_IGMP + uip_ipaddr_t destip = uip_ip4addr_conv(pbuf->destipaddr); + if (uip_grpfind(dev, &destip) == NULL) +#endif + { #ifdef CONFIG_NET_STATISTICS - uip_stat.ip.drop++; + uip_stat.ip.drop++; #endif - goto drop; + goto drop; + } } + #else /* CONFIG_NET_IPv6 */ /* For IPv6, packet reception is a little trickier as we need to * make sure that we listen to certain multicast addresses (all |