aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/socket_netlink_route.txt
Commit message (Collapse)AuthorAgeFilesLines
* sys/linux: update socket_netlink_generic_gtp description filePimyn Girgis2024-07-181-2/+1
| | | | | | | Accounted for added command and added fields in gtp_policy and gtp_genl_policy. Users can create GTP devices without providing IFLA_GTP_FD0 and IFLA_GTP_FD1 arguments, if IFLA_GTP_CREATE_SOCKETS field is set.
* sys/linux: run make extractAlexander Potapenko2024-05-151-0/+6
| | | | | | | | | Make the following changes for extraction to succeed: - drop the KVM API constants for features removed in 6.9; - hardcode the three TUNNEL_*_OPT constants that cannot be extracted due to a header change; - hardcode the HCI_OP_* constants removed in 99fca36c8b412 ("Bluetooth: HCI: Remove HCI_AMP support"); - hardcode the L2CAP_* constants removed in e7b02296fb40 ("Bluetooth: Remove BT_HS"); - hardcode LANDLOCK_ACCESS_FS_IOCTL_DEV until it hits upstream.
* sys/linux: use nested flag definitions where sensiblePaul Chaignon2023-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All flags that are subset of other flags were identified with the following Bash script [1]. Only a small set of flags identified by the script were rewritten to use nested flag definitions, after manually checking if it makes sense (based on syzkaller context and man pages). For example, msgget_flags was rewritten as follows: -msgget_flags = IPC_CREAT, IPC_EXCL, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH +msgget_flags = IPC_CREAT, IPC_EXCL, open_mode According to the msgget(2) man page: Upon creation, the least significant bits of the argument msgflg define the permissions of the message queue. These permission bits have the same format and semantics as the permissions specified for the mode argument of open(2). So it is correct to use open_mode directly in the definition of the flags for msgget(2). 1 - #!/bin/bash regexp_flags="^(\w+)\s*=\s+([a-zA-Z\"][^=]*)$" is_subset() { local -n subset=$1 local -n superset=$2 for element in "${subset[@]}"; do if [[ ! " ${superset[@]} " =~ " $element " ]]; then return 1 fi done return 0 } declare -A parsed_lines while IFS= read -r line; do if [[ ! "$line" =~ $regexp_flags ]]; then continue fi list_name="${BASH_REMATCH[1]}" values="${BASH_REMATCH[2]}" IFS=',' read -r -a values_array <<< "$(echo "$values" | sed 's/ //g' | tr ',' '\n' | sort | tr '\n' ',')" # Skip flags with too few value. if [ "${#values_array[@]}" -lt 3 ]; then continue fi # Skip the syz0, syz1, etc. lists. if [ "${values_array[0]}" = "\"syz0\"" ]; then continue fi parsed_lines["${list_name}"]="${values_array[@]}" done for list_name in "${!parsed_lines[@]}"; do values_array=(${parsed_lines["$list_name"]}) for other_list_name in "${!parsed_lines[@]}"; do other_values_array=(${parsed_lines["$other_list_name"]}) if [ "$list_name" = "$other_list_name" ]; then continue fi if is_subset values_array other_values_array; then if [ "${#values_array[@]}" -eq "${#other_values_array[@]}" ]; then echo "$list_name EQUALS $other_list_name" else echo "$list_name is a SUBET of $other_list_name" fi fi done done Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
* executor: fix setup of xfrm deviceDmitry Vyukov2022-09-091-1/+1
| | | | | | | | | | XFRM device creation will fail w/o IFLA_XFRM_IF_ID attribute: https://elixir.bootlin.com/linux/v6.0-rc4/source/net/xfrm/xfrm_interface.c#L648 Add this attribute. This ID is also present in descriptions in at least 2 places. In one we got it wrong, it's not ifindex (easy to confuse because of the name). Fix it as well.
* sys/linux: fix bugs pointed out by syz-checkDmitry Vyukov2022-01-131-37/+79
| | | | Update #590
* sys/linux: change netlink policies to the new $ conventionDmitry Vyukov2022-01-131-47/+47
|
* sys/linux: support sticky fdb entriesPaul Chaignon2022-01-031-1/+1
| | | | | | | The new neighbour flag NTF_STICKY was added upstream in commit v4.20-rc1~14^2~392. Signed-off-by: Paul Chaignon <paul@isovalent.com>
* sys/linux: describe NDA_FLAGS_EXT netlink attributePaul Chaignon2022-01-031-0/+2
| | | | | | | | The NDA_FLAGS_EXT netlink attribute was added upstream in commit v5.16-rc1~159^2~222^2~1, to allow for new neighbor flags. The only such flag currently supported is NTF_EXT_MANAGED. Signed-off-by: Paul Chaignon <paul@isovalent.com>
* sys/linux: describe creation of batadv devicesDmitry Vyukov2021-10-211-0/+9
| | | | See: https://elixir.bootlin.com/linux/v5.15-rc6/source/include/uapi/linux/batman_adv.h#L692
* sys/linux: update constsZi Fan Tan2021-07-281-11/+0
| | | | | | | Update dev_vhci consts as they were updated to use inclusive language in commit 3d4f9c00492b and 6397729bb74d. Remove caif_hsi consts as they were removed in commit ca75bcf0a83b. Remove raw driver ioctls as they were removed in commit 603e4922f1c8.
* sys/linux: add lwtunnel_encap_seg6 descriptionIoana-Ruxandra Stăncioi2020-08-191-17/+14
| | | | | Uncommented because the kernel fixed the seg6_iptunnel.h uapi header https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=88fab21c691bb1ff164e540735237a385e3afeaf
* sys/linux: add missing flags to rtnexthopAlbert van der Linde2020-08-081-3/+3
|
* sys/linux: add descriptions for RTM_(NEW|DEL|GET)NEXTHOPAlbert van der Linde2020-08-081-0/+57
| | | | https://elixir.bootlin.com/linux/v5.8-rc4/source/net/ipv4/nexthop.c#L1961
* sys/linux: add lwtunnel_encap_seg6_localRuxandra Stăncioi2020-07-241-1/+15
| | | | | https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/seg6_local.h#L21 https://elixir.bootlin.com/linux/latest/source/net/ipv6/seg6_local.c#L649
* sys/linux: add lwtunnel_encap_bpf descriptionRuxandra Stăncioi2020-07-241-0/+10
| | | | | https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/lwtunnel.h#L102 https://elixir.bootlin.com/linux/latest/source/net/core/lwt_bpf.c#L364
* sys/linux: add lwtunnel_encap_seg6 descriptionRuxandra Stăncioi2020-07-241-0/+18
| | | | | https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/seg6_iptunnel.h#L22 TODO: uncomment after the kernel fixes the seg6_iptunnel.h uapi header
* sys/linux: add lwtunnel_encap_ip6 descriptionRuxandra Stăncioi2020-07-241-0/+8
| | | | https://elixir.bootlin.com/linux/latest/source/net/ipv4/ip_tunnel_core.c#L713
* sys/linux: add lwtunnel_encap_ila descriptionRuxandra Stăncioi2020-07-241-0/+13
| | | | | | https://elixir.bootlin.com/linux/latest/source/net/ipv6/ila/ila_lwt.c#L121 The comment is about their statement in the kernel file: https://elixir.bootlin.com/linux/latest/source/net/ipv6/ila/ila_lwt.c#L196
* sys/linux: add lwtunnel_encap_ip descriptionRuxandra Stăncioi2020-07-241-0/+33
| | | | | | | | | https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/lwtunnel.h#L102 https://elixir.bootlin.com/linux/latest/source/net/ipv4/ip_tunnel_core.c#L219 The policies added have a suffix (_lwt), because they already exist in syzkaller with the kernel name. An example of a union with the same name described in sys/linux/socket_netlink_route_sched.txt: https://elixir.bootlin.com/linux/latest/source/net/sched/cls_flower.c#L709
* sys/linux: add lwtunnel_encap_mpls descriptionRuxandra Stăncioi2020-07-241-0/+4
| | | | https://elixir.bootlin.com/linux/latest/source/net/mpls/mpls_iptunnel.c#L25
* sys/linux: add ipv6_rpl_sr_hdr descriptionRuxandra Stăncioi2020-07-241-4/+17
| | | | | https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/rpl.h#L19 update google#533
* sys/linux: add netlink encap type LWTUNNEL_ENCAP_RPLRuxandra Stăncioi2020-07-241-1/+1
| | | | | | | Added a new encap type, from the lwtunnel_encap_types struct, defined in the include/uapi/linux/lwtunnel.h file. https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/lwtunnel.h#L16 Update #533.
* syz/linux: fix formatingAlbert van der Linde2020-07-221-1/+0
|
* sys/linux: add descriptions for RTM_(NEW|DEL|GET)MDBAlbert van der Linde2020-07-221-0/+34
| | | | https://elixir.bootlin.com/linux/latest/source/net/bridge/br_mdb.c#L837
* sys/linux: add descriptions for RTM_(NEW|DEL|GET)VLANAlbert van der Linde2020-07-221-0/+41
| | | | https://elixir.bootlin.com/linux/latest/source/net/bridge/br_vlan.c#L2045
* sys/linux: add descriptions for RTM_(NEW|DEL|GET)ADDRLABELAlbert van der Linde2020-07-221-0/+19
| | | | https://elixir.bootlin.com/linux/latest/source/net/ipv6/addrlabel.c#L625
* sys/linux: add descriptions for RTM_(NEW|DEL|GET)LINKPROPAlbert van der Linde2020-07-221-0/+3
| | | | https://elixir.bootlin.com/linux/latest/source/net/core/rtnetlink.c#L5565
* sys/linux: fix some warnings in descriptionsDmitry Vyukov2020-05-251-2/+5
|
* pkg/compiler: check that flags values fit into base typeDmitry Vyukov2020-03-171-1/+2
| | | | | | | | flags[foo, int8] foo = 0x12345678 is always an error, detect these cases. Found some bugs in mptcp, packet sockets, kvm.
* sys/linux: add some wireguard descriptionsDmitry Vyukov2020-01-311-0/+1
| | | | Update #806
* sys/linux: check for missing/duplicate netlink attrsDmitry Vyukov2020-01-231-4/+4
| | | | Update #590
* sys/linux: fix incorrect nlattr sizesDmitry Vyukov2020-01-221-79/+100
| | | | Update #590
* sys/linux: mark all nested netlink attributes as nlnestDmitry Vyukov2020-01-221-17/+17
| | | | | | | | | | | As far as I understand most subsystems don't care about the nest flag, but some do. But marking them as nest won't harm (?). Let's mark all of them. Caught several cases where should have been used array[policy] but used just policy. Update #590
* tools/syz-check: improve matching netlink attributesDmitry Vyukov2020-01-221-40/+38
| | | | | | | | | | 1. Match policies that has a _suffix in our descriptions (we frequently do this to improve precision or avoid dup names). 2. Rename policies in descriptions to match kernel names. 3. Match policy if there are several such names in kernel. 4. Recognize policies with helper sub-policies. Update #590
* sys/linux: add new netlink warningsDmitry Vyukov2020-01-221-0/+2
| | | | Update #590
* sys/linux: fix IFLA_BR_GROUP_ADDR typeDmitry Vyukov2020-01-201-1/+1
|
* sys/linux: add more device descriptions (geneve, lowpan, ipoib, cfhsi)Dmitry Vyukov2020-01-191-1/+37
|
* sys/linux: add NFNL_SUBSYS_QUEUE descriptionsDmitry Vyukov2020-01-091-3/+1
|
* sys/linux: fix 2 netlink data layout bugsDmitry Vyukov2020-01-071-1/+14
| | | | | | | | | | | 1. Turns out that NLA_F_NESTED is actually used and checked (nla_parse_nested checks it, while nla_parse_nested_deprecated does not). Similarly, ipset extensively checks NLA_F_NET_BYTEORDER. So we need these bits. 2. nla_len must not account for the trailing alighnment padding. This means we set wrong len for payloads that are not multiple of 4 (int8/int16/strings/arrays/some structs/etc).
* sys/linux: add vlan/macvlan/ipvlan/mactap device policiesDmitry Vyukov2020-01-031-6/+70
|
* sys/linux: add virt_wifi and xfrm devicesDmitry Vyukov2019-12-301-4/+34
| | | | + some netlink descriptions
* sys/linux: fix warnings in template definitionDmitry Vyukov2019-12-221-1/+1
| | | | Update #590
* sys/linux: update mpls_lable and rta typesHangbin Liu2019-06-261-1/+4
| | | | | | | | | | | | | | Kernel get mpls lable like ``` unsigned entry = be32_to_cpu(hdr->label_stack_entry); result.label = (entry & MPLS_LS_LABEL_MASK) >> MPLS_LS_LABEL_SHIFT; ``` So we just need to store the label in big endian order. For mpls rta types, kernel accpet only one lable for RTA_DST and multi labels for RTA_NEWDST. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
* sys/linux: add /dev/ppp descriptionsDmitry Vyukov2019-01-041-0/+2
|
* sys/linux: detail ifla_vf_policy/ifla_port_policy/ifla_xdp_policyDmitry Vyukov2018-12-301-4/+85
|
* sys/linux: add can routesDmitry Vyukov2018-12-301-0/+53
|
* sys/linux: refine few types in NETLINK_ROUTEDmitry Vyukov2018-12-291-7/+6
|
* sys/linux: add RTM_NEWNSID/RTM_GETNSIDDmitry Vyukov2018-12-221-4/+13
|
* sys/linux: fix RTA_EXPIRES in rtm_ipv6_policyTobias Klauser2018-09-201-1/+1
|
* sys/linux/socket_netlink_route: add specific policies for IFLA_LINKINFOHangbin Liu2018-07-171-6/+224
| | | | | | | | Add interface specified policies for IFLA_LINKINFO. I only added the interfaces we create in initial setup. Remain other types of interfaces in the TODO list. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>