mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-08-09 06:14:34 +02:00
fou_udp_recv() has the same problem mentioned in the previous
patch.
If FOU_ATTR_IPPROTO is set to 0, skb is not freed by
fou_udp_recv() nor "resubmit"-ted in ip_protocol_deliver_rcu().
Let's forbid 0 for FOU_ATTR_IPPROTO.
Fixes: 23461551c0 ("fou: Support for foo-over-udp RX path")
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260115172533.693652-4-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
135 lines
2.3 KiB
YAML
135 lines
2.3 KiB
YAML
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
|
---
|
|
name: fou
|
|
|
|
protocol: genetlink-legacy
|
|
|
|
doc: |
|
|
Foo-over-UDP.
|
|
|
|
c-family-name: fou-genl-name
|
|
c-version-name: fou-genl-version
|
|
max-by-define: true
|
|
kernel-policy: global
|
|
|
|
definitions:
|
|
-
|
|
type: enum
|
|
name: encap-type
|
|
name-prefix: fou-encap-
|
|
enum-name:
|
|
entries: [unspec, direct, gue]
|
|
|
|
attribute-sets:
|
|
-
|
|
name: fou
|
|
name-prefix: fou-attr-
|
|
attributes:
|
|
-
|
|
name: unspec
|
|
type: unused
|
|
value: 0
|
|
-
|
|
name: port
|
|
type: u16
|
|
byte-order: big-endian
|
|
-
|
|
name: af
|
|
type: u8
|
|
-
|
|
name: ipproto
|
|
type: u8
|
|
checks:
|
|
min: 1
|
|
-
|
|
name: type
|
|
type: u8
|
|
-
|
|
name: remcsum-nopartial
|
|
type: flag
|
|
-
|
|
name: local-v4
|
|
type: u32
|
|
-
|
|
name: local-v6
|
|
type: binary
|
|
checks:
|
|
exact-len: 16
|
|
-
|
|
name: peer-v4
|
|
type: u32
|
|
-
|
|
name: peer-v6
|
|
type: binary
|
|
checks:
|
|
exact-len: 16
|
|
-
|
|
name: peer-port
|
|
type: u16
|
|
byte-order: big-endian
|
|
-
|
|
name: ifindex
|
|
type: s32
|
|
|
|
operations:
|
|
list:
|
|
-
|
|
name: unspec
|
|
doc: unused
|
|
value: 0
|
|
|
|
-
|
|
name: add
|
|
doc: Add port.
|
|
attribute-set: fou
|
|
|
|
dont-validate: [strict, dump]
|
|
flags: [admin-perm]
|
|
|
|
do:
|
|
request: &all_attrs
|
|
attributes:
|
|
- port
|
|
- ipproto
|
|
- type
|
|
- remcsum-nopartial
|
|
- local-v4
|
|
- peer-v4
|
|
- local-v6
|
|
- peer-v6
|
|
- peer-port
|
|
- ifindex
|
|
|
|
-
|
|
name: del
|
|
doc: Delete port.
|
|
attribute-set: fou
|
|
|
|
dont-validate: [strict, dump]
|
|
flags: [admin-perm]
|
|
|
|
do:
|
|
request: &select_attrs
|
|
attributes:
|
|
- af
|
|
- ifindex
|
|
- port
|
|
- peer-port
|
|
- local-v4
|
|
- peer-v4
|
|
- local-v6
|
|
- peer-v6
|
|
|
|
-
|
|
name: get
|
|
doc: Get tunnel info.
|
|
attribute-set: fou
|
|
dont-validate: [strict, dump]
|
|
|
|
do:
|
|
request: *select_attrs
|
|
reply: *all_attrs
|
|
|
|
dump:
|
|
reply: *all_attrs
|