mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
accept messages to all routers if UIP_CONF_ROUTER is set.
This commit is contained in:
parent
be313dd97d
commit
5b0b36c39e
@ -47,7 +47,7 @@
|
||||
*
|
||||
* This file is part of the uIP TCP/IP stack.
|
||||
*
|
||||
* $Id: uip.h,v 1.24 2009/04/06 13:18:50 nvt-se Exp $
|
||||
* $Id: uip.h,v 1.25 2009/11/12 14:05:42 joxe Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -1950,6 +1950,19 @@ CCIF extern uip_lladdr_t uip_lladdr;
|
||||
(((a)->u8[14]) == 0) && \
|
||||
(((a)->u8[15]) == 0x01))
|
||||
|
||||
/** \brief Is IPv6 address a the link local all-routers multicast address */
|
||||
#define uip_is_addr_linklocal_allrouters_mcast(a) \
|
||||
((((a)->u8[0]) == 0xff) && \
|
||||
(((a)->u8[1]) == 0x02) && \
|
||||
(((a)->u16[1]) == 0) && \
|
||||
(((a)->u16[2]) == 0) && \
|
||||
(((a)->u16[3]) == 0) && \
|
||||
(((a)->u16[4]) == 0) && \
|
||||
(((a)->u16[5]) == 0) && \
|
||||
(((a)->u16[6]) == 0) && \
|
||||
(((a)->u8[14]) == 0) && \
|
||||
(((a)->u8[15]) == 0x02))
|
||||
|
||||
/** \brief set IP address a to unspecified */
|
||||
#define uip_create_unspecified(a) uip_ip6addr(a, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
*
|
||||
* This file is part of the uIP TCP/IP stack.
|
||||
*
|
||||
* $Id: uip6.c,v 1.7 2009/10/27 22:34:08 adamdunkels Exp $
|
||||
* $Id: uip6.c,v 1.8 2009/11/12 14:05:42 joxe Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -1103,7 +1103,8 @@ uip_process(u8_t flag)
|
||||
UIP_IP_BUF->ttl = UIP_IP_BUF->ttl - 1;
|
||||
UIP_STAT(++uip_stat.ip.forwarded);
|
||||
goto send;
|
||||
} else if(!uip_is_addr_linklocal_allnodes_mcast(&UIP_IP_BUF->destipaddr)) {
|
||||
} else if(!uip_is_addr_linklocal_allnodes_mcast(&UIP_IP_BUF->destipaddr) &&
|
||||
!uip_is_addr_linklocal_allrouters_mcast(&UIP_IP_BUF->destipaddr)) {
|
||||
PRINTF("Dropping packet, not for me\n");
|
||||
UIP_STAT(++uip_stat.ip.drop);
|
||||
goto drop;
|
||||
|
Loading…
Reference in New Issue
Block a user