diff options
author | Matias Elo <matias.elo@nokia.com> | 2017-04-04 09:28:18 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2017-06-16 16:51:10 +0300 |
commit | fdddf685fcad06f05f3788705968622b23a569ac (patch) | |
tree | d53e12e7c57e225ca667a68aa72b0cf770e22546 /platform/linux-generic | |
parent | 29b29677ed7d5d396f4aec1d0f3197efbf119113 (diff) |
linux-gen: packet: recognize ICMPv6 packets
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic')
-rw-r--r-- | platform/linux-generic/include/protocols/ip.h | 3 | ||||
-rw-r--r-- | platform/linux-generic/odp_packet.c | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/platform/linux-generic/include/protocols/ip.h b/platform/linux-generic/include/protocols/ip.h index 20041f1c0..2b34a753f 100644 --- a/platform/linux-generic/include/protocols/ip.h +++ b/platform/linux-generic/include/protocols/ip.h @@ -157,13 +157,14 @@ typedef struct ODP_PACKED { * IP protocol values (IPv4:'proto' or IPv6:'next_hdr') * @{*/ #define _ODP_IPPROTO_HOPOPTS 0x00 /**< IPv6 hop-by-hop options */ -#define _ODP_IPPROTO_ICMP 0x01 /**< Internet Control Message Protocol (1) */ +#define _ODP_IPPROTO_ICMPv4 0x01 /**< Internet Control Message Protocol (1) */ #define _ODP_IPPROTO_TCP 0x06 /**< Transmission Control Protocol (6) */ #define _ODP_IPPROTO_UDP 0x11 /**< User Datagram Protocol (17) */ #define _ODP_IPPROTO_ROUTE 0x2B /**< IPv6 Routing header (43) */ #define _ODP_IPPROTO_FRAG 0x2C /**< IPv6 Fragment (44) */ #define _ODP_IPPROTO_AH 0x33 /**< Authentication Header (51) */ #define _ODP_IPPROTO_ESP 0x32 /**< Encapsulating Security Payload (50) */ +#define _ODP_IPPROTO_ICMPv6 0x3A /**< Internet Control Message Protocol (58) */ #define _ODP_IPPROTO_SCTP 0x84 /**< Stream Control Transmission protocol (132) */ #define _ODP_IPPROTO_INVALID 0xFF /**< Reserved invalid by IANA */ diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index e2bb8426a..c6962ce97 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -2078,7 +2078,10 @@ int packet_parse_common(packet_parser_t *prs, const uint8_t *ptr, /* Parse Layer 4 headers */ switch (prs->ip_proto) { - case _ODP_IPPROTO_ICMP: + case _ODP_IPPROTO_ICMPv4: + /* Fall through */ + + case _ODP_IPPROTO_ICMPv6: prs->input_flags.icmp = 1; break; |