summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ioam6_iptunnel.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-14 16:50:14 -0700
committerJakub Kicinski <kuba@kernel.org>2021-10-14 16:50:14 -0700
commite15f5972b8031f9069f41e24adff63bd34463b3a (patch)
treed31c80ea86df9cdd9f8189dc2a89603aac57402f /net/ipv6/ioam6_iptunnel.c
parent8b017fbe0bbb98dd71fb4850f6b9cc0e136a26b8 (diff)
parentec681c53f8d2d0ee362ff67f5b98dd8263c15002 (diff)
downloadlinux-e15f5972b8031f9069f41e24adff63bd34463b3a.tar.gz
linux-e15f5972b8031f9069f41e24adff63bd34463b3a.tar.bz2
linux-e15f5972b8031f9069f41e24adff63bd34463b3a.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
tools/testing/selftests/net/ioam6.sh 7b1700e009cc ("selftests: net: modify IOAM tests for undef bits") bf77b1400a56 ("selftests: net: Test for the IOAM encapsulation with IPv6") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6/ioam6_iptunnel.c')
-rw-r--r--net/ipv6/ioam6_iptunnel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv6/ioam6_iptunnel.c b/net/ipv6/ioam6_iptunnel.c
index 392c183076ce..f90a87389fcc 100644
--- a/net/ipv6/ioam6_iptunnel.c
+++ b/net/ipv6/ioam6_iptunnel.c
@@ -67,7 +67,11 @@ static bool ioam6_validate_trace_hdr(struct ioam6_trace_hdr *trace)
u32 fields;
if (!trace->type_be32 || !trace->remlen ||
- trace->remlen > IOAM6_TRACE_DATA_SIZE_MAX / 4)
+ trace->remlen > IOAM6_TRACE_DATA_SIZE_MAX / 4 ||
+ trace->type.bit12 | trace->type.bit13 | trace->type.bit14 |
+ trace->type.bit15 | trace->type.bit16 | trace->type.bit17 |
+ trace->type.bit18 | trace->type.bit19 | trace->type.bit20 |
+ trace->type.bit21)
return false;
trace->nodelen = 0;