|
@@ -1764,6 +1764,7 @@ static u64 bpf_skb_get_tunnel_key(u64 r1, u64 r2, u64 size, u64 flags, u64 r5)
|
|
|
if (unlikely(size != sizeof(struct bpf_tunnel_key))) {
|
|
|
switch (size) {
|
|
|
case offsetof(struct bpf_tunnel_key, tunnel_label):
|
|
|
+ case offsetof(struct bpf_tunnel_key, tunnel_ext):
|
|
|
goto set_compat;
|
|
|
case offsetof(struct bpf_tunnel_key, remote_ipv6[1]):
|
|
|
/* Fixup deprecated structure layouts here, so we have
|
|
@@ -1849,6 +1850,7 @@ static u64 bpf_skb_set_tunnel_key(u64 r1, u64 r2, u64 size, u64 flags, u64 r5)
|
|
|
if (unlikely(size != sizeof(struct bpf_tunnel_key))) {
|
|
|
switch (size) {
|
|
|
case offsetof(struct bpf_tunnel_key, tunnel_label):
|
|
|
+ case offsetof(struct bpf_tunnel_key, tunnel_ext):
|
|
|
case offsetof(struct bpf_tunnel_key, remote_ipv6[1]):
|
|
|
/* Fixup deprecated structure layouts here, so we have
|
|
|
* a common path later on.
|
|
@@ -1861,7 +1863,8 @@ static u64 bpf_skb_set_tunnel_key(u64 r1, u64 r2, u64 size, u64 flags, u64 r5)
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
}
|
|
|
- if (unlikely(!(flags & BPF_F_TUNINFO_IPV6) && from->tunnel_label))
|
|
|
+ if (unlikely((!(flags & BPF_F_TUNINFO_IPV6) && from->tunnel_label) ||
|
|
|
+ from->tunnel_ext))
|
|
|
return -EINVAL;
|
|
|
|
|
|
skb_dst_drop(skb);
|