net: Handle IPv6 packet reception

When read from the Rx FIFO, pass the network buffer to the uIP IPv6
stack using the tcpip_input() function. As the event is handled, not
all cases where the buffer is to be discarded can be detected.
Thus, if ICMPv6 errors will not be sent, indicate that the packet is
to be dropped by setting its length to zero.

Change-Id: I49f69011685e39759ba25ebb07670308382a5ca8
Signed-off-by: Patrik Flykt <patrik.flykt@linux.intel.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Patrik Flykt 2015-05-26 13:45:40 +03:00 committed by Anas Nashif
commit 586f3adf6e
3 changed files with 3 additions and 10 deletions

View file

@ -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