ipsec: fix logic in ext_hdr_is_pre_esp
When _VEC128 instructions are not enabled logic is buggy. The function always returned 1. Type: fix Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com> Change-Id: I603200637e8d65813f4e49ef15d798e74b79b9cf
This commit is contained in:
Piotr Bronowski
committed by
Fan Zhang
parent
2da272e3da
commit
3a6bc6f127
@ -182,9 +182,9 @@ ext_hdr_is_pre_esp (u8 nexthdr)
|
||||
|
||||
return !u8x16_is_all_zero (ext_hdr_types == u8x16_splat (nexthdr));
|
||||
#else
|
||||
return ((nexthdr ^ IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS) |
|
||||
(nexthdr ^ IP_PROTOCOL_IPV6_ROUTE) |
|
||||
((nexthdr ^ IP_PROTOCOL_IPV6_FRAGMENTATION) != 0));
|
||||
return (!(nexthdr ^ IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS) ||
|
||||
!(nexthdr ^ IP_PROTOCOL_IPV6_ROUTE) ||
|
||||
!(nexthdr ^ IP_PROTOCOL_IPV6_FRAGMENTATION));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user