decrement TTL right after forwarding check.
This commit is contained in:
parent
f181ba6f7d
commit
e2bbdbca9b
|
@ -41,7 +41,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the uIP TCP/IP stack.
|
* This file is part of the uIP TCP/IP stack.
|
||||||
*
|
*
|
||||||
* $Id: uip6.c,v 1.5 2009/04/06 13:18:51 nvt-se Exp $
|
* $Id: uip6.c,v 1.6 2009/05/19 11:54:50 nvt-se Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1092,6 +1092,9 @@ uip_process(u8_t flag)
|
||||||
PRINTF("Forwarding packet to ");
|
PRINTF("Forwarding packet to ");
|
||||||
PRINT6ADDR(&UIP_IP_BUF->destipaddr);
|
PRINT6ADDR(&UIP_IP_BUF->destipaddr);
|
||||||
PRINTF("\n");
|
PRINTF("\n");
|
||||||
|
|
||||||
|
/* Decrement the TTL (time-to-live) value in the IP header */
|
||||||
|
UIP_IP_BUF->ttl = UIP_IP_BUF->ttl - 1;
|
||||||
UIP_STAT(++uip_stat.ip.forwarded);
|
UIP_STAT(++uip_stat.ip.forwarded);
|
||||||
goto send;
|
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)) {
|
||||||
|
|
Loading…
Reference in a new issue