diff --git a/core/net/uip-over-mesh.c b/core/net/uip-over-mesh.c index c47f0b7f9..9ad8d73e3 100644 --- a/core/net/uip-over-mesh.c +++ b/core/net/uip-over-mesh.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: uip-over-mesh.c,v 1.12 2009/04/29 11:40:33 adamdunkels Exp $ + * $Id: uip-over-mesh.c,v 1.13 2009/05/04 11:24:04 adamdunkels Exp $ */ /** @@ -80,6 +80,11 @@ static uip_ipaddr_t netaddr, netmask; static void recv_data(struct unicast_conn *c, rimeaddr_t *from) { + struct route_entry *e; + + e = route_lookup(from); + route_refresh(e); + uip_len = packetbuf_copyto(&uip_buf[UIP_LLH_LEN]); /* uip_len = hc_inflate(&uip_buf[UIP_LLH_LEN], uip_len);*/ @@ -185,8 +190,8 @@ uip_over_mesh_init(u16_t channels) trickle_open(&gateway_announce_conn, CLOCK_SECOND * 4, channels + 3, &trickle_call); - /* tcpip_set_forwarding(1);*/ - + /* Set lifetime to 10 seconds for non-refreshed routes. */ + route_set_lifetime(10); } /*---------------------------------------------------------------------------*/ u8_t