Skip to content
Commit 6dae106d authored by Ruslan Mstoi's avatar Ruslan Mstoi Committed by Anas Nashif
Browse files

net: ipv6: Drop packet with multiple HBHO



If a malformed packet with multiple HBHO is received by the Zephyr IP
stack it replies with ICMPv6 type 4 code 1: "Parameter problem
unrecognized Next Header type encountered". This ICMPv6 message has
wrong IPv6 payload length and ICMPv6 checksum.

RFC 8200 in chapter 4.1 states:

   Each extension header should occur at most once, except for the
   Destination Options header, which should occur at most twice (once
   before a Routing header and once before the upper-layer header).

There are two possible solutions to the problem at hand:

1) Respond with ICMPv6 Parameter problem, in this case IPv6 length and
   ICMPv6 checksum need to be fixed

2) Drop the malformed packet

This patch implements the easy solution - 2. Basically it changes the
code to drop the malformed packet instead of sending ICMPv6 type 4
code 1.

Signed-off-by: default avatarRuslan Mstoi <ruslan.mstoi@intel.com>
parent 18b8a633
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment