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/uip/uip_input.c | |
parent | 9c5218976bd64888b9aeaabd5ca2e91af9b93bd0 (diff) | |
download | nuttx-9c43f66fc25286196f9ce520489b80c891e9199a.tar.gz nuttx-9c43f66fc25286196f9ce520489b80c891e9199a.tar.bz2 nuttx-9c43f66fc25286196f9ce520489b80c891e9199a.zip |
net/: IGMP-related bugfixes from Manuel Stühn
Diffstat (limited to 'nuttx/net/uip/uip_input.c')
-rw-r--r-- | nuttx/net/uip/uip_input.c | 13 |
1 files changed, 10 insertions, 3 deletions
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 |