Files
linux/Documentation/netlink/specs/fou.yaml
Asbjørn Sloth Tønnesen 9f9581ba74 netlink: specs: fou: change local-v6/peer-v6 check
While updating the binary min-len implementation, I noticed that
the only user, should AFAICT be using exact-len instead.

In net/ipv4/fou_core.c FOU_ATTR_LOCAL_V6 and FOU_ATTR_PEER_V6
are only used for singular IPv6 addresses, and there are AFAICT
no known implementations trying to send more, it therefore
appears safe to change it to an exact-len policy.

This patch therefore changes the local-v6/peer-v6 attributes to
use an exact-len check, instead of a min-len check.

Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://patch.msgid.link/20250902154640.759815-2-ast@fiberby.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-09-03 15:16:49 -07:00

133 lines
2.2 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
-
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