Skip to content

Commit 109f8b5

Browse files
one-d-widekuba-moo
authored andcommitted
doc/netlink: Fix typos in operation attributes
I'm trying to generate Rust bindings for netlink using the yaml spec. It looks like there's a typo in conntrack spec: attribute set conntrack-attrs defines attributes "counters-{orig,reply}" (plural), while get operation references "counter-{orig,reply}" (singular). The latter should be fixed, as it denotes multiple counters (packet and byte). The corresonding C define is CTA_COUNTERS_ORIG. Also, dump request references "nfgen-family" attribute, which neither exists in conntrack-attrs attrset nor ctattr_type enum. There's member of nfgenmsg struct with the same name, which is where family value is actually taken from. > static int ctnetlink_dump_exp_ct(struct net *net, struct sock *ctnl, > struct sk_buff *skb, > const struct nlmsghdr *nlh, > const struct nlattr * const cda[], > struct netlink_ext_ack *extack) > { > int err; > struct nfgenmsg *nfmsg = nlmsg_data(nlh); > u_int8_t u3 = nfmsg->nfgen_family; ^^^^^^^^^^^^ Signed-off-by: Remy D. Farley <one-d-wide@protonmail.com> Fixes: 23fc931 ("netlink: specs: add conntrack dump and stats dump support") Link: https://patch.msgid.link/20250913140515.1132886-1-one-d-wide@protonmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 93ab488 commit 109f8b5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Documentation/netlink/specs/conntrack.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,8 @@ operations:
575575
- nat-dst
576576
- timeout
577577
- mark
578-
- counter-orig
579-
- counter-reply
578+
- counters-orig
579+
- counters-reply
580580
- use
581581
- id
582582
- nat-dst
@@ -591,7 +591,6 @@ operations:
591591
request:
592592
value: 0x101
593593
attributes:
594-
- nfgen-family
595594
- mark
596595
- filter
597596
- status
@@ -608,8 +607,8 @@ operations:
608607
- nat-dst
609608
- timeout
610609
- mark
611-
- counter-orig
612-
- counter-reply
610+
- counters-orig
611+
- counters-reply
613612
- use
614613
- id
615614
- nat-dst

0 commit comments

Comments
 (0)