diff mbox series

[v2,6/7] linux-gen: packet: fix IP multicast parse

Message ID 1518530410-18574-7-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v2,1/7] validation: common: remove camel case names | expand

Commit Message

Github ODP bot Feb. 13, 2018, 2 p.m. UTC
From: Petri Savolainen <petri.savolainen@linaro.org>


IPv4 multicast address range is between 224.0.0.0 and
239.255.255.255. So, first four bits are always 0xe (1110).

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
/** Email created from pull request 472 (psavol:master-parser-validation)
 ** https://github.com/Linaro/odp/pull/472
 ** Patch: https://github.com/Linaro/odp/pull/472.patch
 ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847
 ** Merge commit sha: 38d924655e8119f902e986011a477e1ad9094ab6
 **/
 platform/linux-generic/odp_packet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c
index b2a22903c..05b8c4854 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -2028,7 +2028,7 @@  static inline uint8_t parse_ipv4(packet_parser_t *prs, const uint8_t **parseptr,
 	if (odp_unlikely(dstaddr == 0xffffffff))
 		prs->input_flags.ip_bcast = 1;
 
-	if (odp_unlikely((dstaddr >> 28) == 0xd))
+	if (odp_unlikely((dstaddr >> 28) == 0xe))
 		prs->input_flags.ip_mcast = 1;
 
 	return ipv4->proto;