diff --git a/net/ip/contiki/ip/tcpip.c b/net/ip/contiki/ip/tcpip.c index 7ae49bdf9d4..f637f807f06 100644 --- a/net/ip/contiki/ip/tcpip.c +++ b/net/ip/contiki/ip/tcpip.c @@ -535,12 +535,7 @@ eventhandler(process_event_t ev, process_data_t data, struct net_buf *buf) #endif /* UIP_UDP */ case PACKET_INPUT: - if (!packet_input(buf)) { - /* failure, discard the net_buf here because the - * return value cannot be passed to driver any longer - */ - net_buf_put(buf); - } + packet_input(buf); break; }; } diff --git a/net/ip/contiki/ipv6/uip6.c b/net/ip/contiki/ipv6/uip6.c index f3029a62ed2..4840251b6c3 100644 --- a/net/ip/contiki/ipv6/uip6.c +++ b/net/ip/contiki/ipv6/uip6.c @@ -1545,6 +1545,7 @@ uip_process(struct net_buf *buf, uint8_t flag) uip_icmp6_error_output(buf, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOPORT, 0); goto send; #else + uip_len(buf) = 0; goto drop; #endif diff --git a/net/ip/net_init.c b/net/ip/net_init.c index 6cf87021adb..e30d688fb04 100644 --- a/net/ip/net_init.c +++ b/net/ip/net_init.c @@ -347,15 +347,12 @@ static void net_rx_fiber(void) NET_DBG("Starting RX fiber\n"); while (1) { - /* Wait next packet from network */ buf = nano_fifo_get_wait(&netdev.rx_queue); /* Check stack usage (no-op if not enabled) */ analyze_stacks(buf, &buf); - /* TBD: Pass it to IP stack */ - - net_buf_put(buf); + tcpip_input(buf); } }