Re: [PATCH net-next v15 02/22] ovpn: add basic netlink support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 11 Dec 2024 at 21:32, Antonio Quartulli <antonio@xxxxxxxxxxx> wrote:
>
> +        name: peer
> +        type: nest
> +        doc: |
> +          The peer object containing the attributed of interest for the specific

typo: attributes

> +          operation
> +        nested-attributes: peer

I also spotted that the doc: | construct results in extack messages
with embedded \n chars in the ynl cli:

./tools/net/ynl/cli.py --spec Documentation/netlink/specs/ovpn.yaml
--do peer-new --json '{"ifindex": 2 }'
Netlink error: Invalid argument
nl_len = 44 (28) nl_flags = 0x300 nl_type = 2
error: -22
extack: {'miss-type': 'peer', 'miss-type-doc': 'The peer object
containing the attributed of interest for the specific\noperation\n'}

We should probably sanitize the strings in the ynl cli, but you can
specify a flattened block comment in yaml by using the doc: >-
construct instead.

      -
        name: peer
        type: nest
        doc: >-
          The peer object containing the attributes of interest for the specific
          operation

extack: {'miss-type': 'peer', 'miss-type-doc': 'The peer object
containing the attributes of interest for the specific operation'}

Thanks,
Donald




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux