aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
11 daysuapi: update to pre 6.10-rc1 headersStephen Hemminger9-1/+24
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-05-13Merge git://git.kernel.org/pub/scm/network/iproute2/iproute2-nextStephen Hemminger8-7/+253
2024-05-12v6.9.0v6.9.0Stephen Hemminger1-1/+1
2024-05-10uapi: spelling fix for xfrm.hStephen Hemminger1-1/+1
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-05-03Update kernel headersDavid Ahern3-5/+176
Update kernel headers to commit: 5829614a7b3b ("Merge branch 'net-sysctl-sentinel'") Signed-off-by: David Ahern <dsahern@kernel.org>
2024-04-23f_flower: implement pfcp optsMichal Swiatkowski1-0/+6
Allow adding tc filter for PFCP header. Add support for parsing TCA_FLOWER_KEY_ENC_OPTS_PFCP. Options are as follows: TYPE:SEID. TYPE is a 8-bit value represented in hex and can be 1 for session header and 0 for node header. In PFCP packet this is S flag in header. SEID is a 64-bit session id value represented in hex. This patch enables adding hardware filters using PFCP fields, see [1]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=d823265dd45bbf14bd67aa476057108feb4143ce Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2024-04-21Merge remote-tracking branch 'main/main' into nextDavid Ahern1-1/+1
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-04-13Update kernel headersDavid Ahern5-2/+57
Update kernel headers to commit: 32affa5578f0 ("fib: rules: no longer hold RTNL in fib_nl_dumprule()") Signed-off-by: David Ahern <dsahern@kernel.org>
2024-03-16uapi: update headersStephen Hemminger4-1/+69
User headers based on pre 6.9-rc1 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-03-15libnetlink: Add rta_getattr_uint()Petr Machata1-0/+14
NLA_UINT attributes have a 4-byte payload if possible, and an 8-byte one if necessary. Add a function to extract these. Since we need to dispatch on length anyway, make the getter truly universal by supporting also u8 and u16. Signed-off-by: Petr Machata <petrm@nvidia.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2024-03-15Update kernel headersDavid Ahern4-1/+69
Update kernel headers to commit: 237bb5f7f7f5 ("cxgb4: unnecessary check for 0 in the free_sge_txq_uld() function") Signed-off-by: David Ahern <dsahern@kernel.org>
2024-03-11Merge branch 'main' of ↵Stephen Hemminger6-9/+128
git://git.kernel.org/pub/scm/network/iproute2/iproute2-next
2024-03-11v6.8.0v6.8.0Stephen Hemminger1-1/+1
2024-03-06iproute2: move generic_proc_open into libDenis Kirjanov1-0/+2
the function has the same definition in ifstat and ss v2: fix the typo in the chagelog v3: rebase on master Signed-off-by: Denis Kirjanov <dkirjanov@suse.de> Signed-off-by: David Ahern <dsahern@kernel.org>
2024-03-03Update kernel headersDavid Ahern5-6/+52
Update kernel headers to commit 4b2765ae410a ("Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next") Signed-off-by: David Ahern <dsahern@kernel.org>
2024-02-29uapi: update in6.hStephen Hemminger1-1/+1
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-02-18Merge remote-tracking branch 'main/main' into nextDavid Ahern2-2/+2
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-02-09treewide: fix typos in various commentsAndrea Claudi2-2/+2
Fix various typos and spelling errors in some iproute2 comments. Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Andrea Claudi <aclaudi@redhat.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-02-07Update kernel headersDavid Ahern3-5/+82
Update kernel headers to commit: 1e8f1477aba5 ("Merge branch 'net-phy-c22-c45-enumeration'") Signed-off-by: David Ahern <dsahern@kernel.org>
2024-01-22uapi: update virtio_config.hStephen Hemminger1-1/+7
Updated from to 6.8.0-rc1. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-01-18uapi: remove tc_ipt.hStephen Hemminger1-20/+0
Removed upstream. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-01-15uapi: update headers from 6.8-rc1Stephen Hemminger2-158/+2
Removal of no longer used TC structs. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-01-08Merge remote-tracking branch 'main/main' into nextDavid Ahern3-1/+7
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-01-08v6.7.0v6.7.0Stephen Hemminger1-1/+1
2024-01-08remove support for iptables actionStephen Hemminger8-467/+0
There is an open upstream kernel patch to remove ipt action from kernel. This is corresponding iproute2 change. - Remove support fot ipt and xt in tc. - Remove no longer used header files. - Update man pages. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2023-12-30Update kernel headersDavid Ahern6-3/+9
Update kernel headers to commit: 92de776d2090 ("Merge tag 'mlx5-updates-2023-12-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux") Signed-off-by: David Ahern <dsahern@kernel.org>
2023-12-22bridge: Provide rta_type()Benjamin Poirier1-0/+4
Factor out the repeated code pattern rta_type = attr->rta_type & NLA_TYPE_MASK into a helper which is similar to the existing kernel function nla_type(). Reviewed-by: Petr Machata <petrm@nvidia.com> Tested-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22bridge: Deduplicate print_range()Benjamin Poirier1-0/+2
The two implementations are now identical so keep only one instance and move it to json_print.c where there are already a few other specialized printing functions. The string that's formatted in the "end" buffer is only needed when outputting a range so move the snprintf() call within the condition. The second argument's purpose is better conveyed by calling it "end" rather than "id" so rename it. Reviewed-by: Petr Machata <petrm@nvidia.com> Tested-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-08uapi: update stddef.hStephen Hemminger1-1/+1
Change from upstream 6.7-rc4 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-06Update kernel headersDavid Ahern3-16/+554
Update kernel headers to commit: 074ac38d5b95 ("octeontx2-af: cn10k: Increase outstanding LMTST transactions") Signed-off-by: David Ahern <dsahern@kernel.org>
2023-11-22Merge branch 'main' into nextDavid Ahern2-1/+6
Signed-off-by: David Ahern <dsahern@kernel.org>
2023-11-22lib: utils: Introduce parse_one_of_deprecated()Petr Machata1-0/+3
The function parse_one_of() currently uses matches() for string comparison under the hood. Extending matches()-based parsers is tricky, because newly added matches might change the way strings are parsed, if the newly-added string shares a prefix with a string that is matched later in the code. In this patch, introduce a new function, parse_one_of_deprecated(). This will be currently synonymous with parse_one_of(), however the latter will change behavior in the next patch. Use the new function for parsing of the macsec "validate" option. The reason is that the valid strings for that option are "disabled", "check" and "strict". It is not hard to see how "disabled" could be misspelled as "disable", and be baked in some script in this form. Signed-off-by: Petr Machata <petrm@nvidia.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2023-11-22lib: utils: Switch matches() to returning int againPetr Machata1-1/+1
Since commit 1f420318bda3 ("utils: don't match empty strings as prefixes") the function has pretended to return a boolean. But every user expects it to return zero on success and a non-zero value on failure, like strcmp(). Even the function itself actually returns "true" to mean "no match". This only makes sense if one considers a boolean to be a one-bit unsigned integer with no inherent meaning, which I do not think is reasonable. Switch the prototype back to int, and return 1 instead of true. Cc: Matteo Croce <mcroce@redhat.com> Signed-off-by: Petr Machata <petrm@nvidia.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2023-11-13uapi: update headers from 6.7-rc1Stephen Hemminger1-0/+5
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-11-11devlink: introduce support for netns id for nested handleJiri Pirko1-0/+1
Nested handle may contain DEVLINK_ATTR_NETNS_ID attribute that indicates the network namespace where the nested devlink instance resides. Process this converting to netns name if possible and print to user. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2023-11-11ip/ipnetns: move internals of get_netnsid_from_name() into namespace.cJiri Pirko1-0/+3
In order to be able to reuse get_netnsid_from_name() function outside of ip code, move the internals to lib/namespace.c to a new function called netns_id_from_name(). Signed-off-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2023-11-06Merge branch 'main' of ↵Stephen Hemminger13-186/+412
git://git.kernel.org/pub/scm/network/iproute2/iproute2-next
2023-11-06Update kernel headersDavid Ahern11-176/+348
Update kernel headers to commit: ff269e2cd5ad ("Merge tag 'net-next-6.7-followup' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next") Import mptcp_pm.h due to a new dependency. Signed-off-by: David Ahern <dsahern@kernel.org>
2023-11-04v6.6.0v6.6.0Stephen Hemminger1-1/+1
2023-11-03vv6.6.0Stephen Hemminger1-1/+1
2023-10-27bpf: increase verifier verbosity when in verbose modeShung-Hsi Yu1-2/+2
The BPF verifier allows setting a higher verbosity level, which is helpful when it comes to debugging verifier issue, specially when used on BPF program that loads successfully (but should not have passed the verifier in the first place). Increase the BPF verifier log level when in verbose mode to help with such cases. Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@suse.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2023-10-19Update kernel headersDavid Ahern5-8/+62
Update kernel headers to commit dcf02bac377e ("Merge branch 'net-stmmac-improve-tx-timer-logic'") Signed-off-by: David Ahern <dsahern@kernel.org>
2023-10-12uapi: update from 6.6-rc5Stephen Hemminger1-5/+1
Update to if_packet.h Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-10-02uapi: update headers from 6.6-rc4Stephen Hemminger2-1/+10
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-09-15uapi: headers update from 6.6-rc2Stephen Hemminger1-0/+4
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-09-11mnl_utils: introduce a helper to check if dump policy exists for commandJiri Pirko1-0/+1
Benefit from GET_POLICY command of ctrl netlink and introduce a helper that dumps policies and finds out, if there is a separate policy specified for dump op of specified command. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2023-09-11Merge remote-tracking branch 'main' into nextDavid Ahern1-1/+1
Signed-off-by: David Ahern <dsahern@kernel.org>
2023-09-06v6.5.0v6.5.0Stephen Hemminger1-1/+1
2023-08-28Update kernel headersDavid Ahern3-5/+38
Update kernel headers to commit: 6c9cfb853063 ("net: ethernet: mtk_wed: minor change in wed_{tx,rx}info_show") Signed-off-by: David Ahern <dsahern@kernel.org>
2023-08-24ip vrf: make ipvrf_exec SELinux-awareAndrea Claudi1-0/+1
When using ip vrf and SELinux is enabled, make sure to set the exec file context before calling cmd_exec. This ensures that the command is executed with the right context, falling back to the ifconfig_t context when needed. Signed-off-by: Andrea Claudi <aclaudi@redhat.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2023-08-24lib: add SELinux include and stub functionsAndrea Claudi1-0/+9
ss provides some selinux stub functions, useful when iproute2 is compiled without selinux support. Move them to lib/ so we can use them in other iproute2 tools. Signed-off-by: Andrea Claudi <aclaudi@redhat.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2023-08-20Merge remote-tracking branch 'main' into nextDavid Ahern1-1/+3
Signed-off-by: David Ahern <dsahern@kernel.org>
2023-08-13Add utility to convert an unsigned int to stringMathieu Schroeter1-0/+1
Signed-off-by: Mathieu Schroeter <mathieu@schroetersa.ch> Signed-off-by: David Ahern <dsahern@kernel.org>
2023-08-13Add get_long utility and adapt get_integer accordinglyMathieu Schroeter1-0/+1
Signed-off-by: Mathieu Schroeter <mathieu@schroetersa.ch> Signed-off-by: David Ahern <dsahern@kernel.org>
2023-08-09uapi: update headersStephen Hemminger2-2/+8
Based off ov 6.5-rc5 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-08-02Merge remote-tracking branch 'main/main' into nextDavid Ahern6-15/+11
Signed-off-by: David Ahern <dsahern@kernel.org>
2023-08-02Update kernel headersDavid Ahern9-19/+177
Update kernel headers to commit: 34093c9fa05d ("net: Remove duplicated include in mac.c") Signed-off-by: David Ahern <dsahern@kernel.org>
2023-07-26Read configuration files from /etc and /usrGioele Barabucci1-2/+5
Add support for the so called "stateless" configuration pattern (read from /etc, fall back to /usr), giving system administrators a way to define local configuration without changing any distro-provided files. In practice this means that each configuration file FOO is loaded from /usr/lib/iproute2/FOO unless /etc/iproute2/FOO exists. Signed-off-by: Gioele Barabucci <gioele@svario.it> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-07-22Add missing SPDX headersStephen Hemminger3-11/+4
All headers and source in iproute2 should be using SPDX license info. Add a couple that were missed, and take off boilerplate. Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-07-22include: dual license the bpf helper includesStephen Hemminger2-2/+2
The files bpf_api.h and bpf_elf.h are useful for TC BPF programs to use. And there is no requirement that those be GPL only; we intend to allow BSD licensed BPF helpers as well. This makes the file license same as libbpf. Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-07-10uapi: update headers to 6.5-rc1Stephen Hemminger5-6/+54
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-06-28Merge git://git.kernel.org/pub/scm/network/iproute2/iproute2-nextStephen Hemminger4-0/+32
2023-06-26v6.4.0v6.4.0Stephen Hemminger1-1/+1
2023-06-21Update kernel headersDavid Ahern2-0/+10
Update kernel headers to commit: cc7554954848 ("net: micrel: Change to receive timestamp in the frame for lan8841") Signed-off-by: David Ahern <dsahern@kernel.org>
2023-06-09uapi: update to bpf.hStephen Hemminger1-0/+1
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-06-06Update kernel headersDavid Ahern4-0/+23
Update kernel headers to commit: ae91f7e436f8 ("net/pppoe: fix a typo for the PPPOE_HASH_BITS_1 definition") Signed-off-by: David Ahern <dsahern@kernel.org>
2023-06-02libnetlink: drop unused rtnl_talk_iovStephen Hemminger1-3/+0
Function was defined but not used in current iproute2 code. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-06-02utils: make local cmdline functions staticStephen Hemminger1-3/+0
No need to expose these parts of command line parsing. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-06-02ipaddress: accept symbolic namesStephen Hemminger1-2/+2
The function rtnl_addproto_a2n() was defined but never used. Use it to allow for symbolic names, and fix the function signatures so protocol value is consistently __u8. Fixes: bdb8d8549ed9 ("ip: Support IP address protocol") Cc: petrm@nvidia.com Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-05-30uapi: update headers to 6.4-rc4Stephen Hemminger1-0/+1
Minor addition to in.h Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-05-30vxlan: make option printing more consistentStephen Hemminger1-0/+9
Add new helper function print_bool_opt() which prints with no prefix and use it for vxlan options. If the option matches the expected default value, it is not printed if in non JSON mode unless the details setting is repeated. Use a table for the vxlan options. This will change the order of the printing of options. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-05-09uapi: add capability.hStephen Hemminger1-0/+430
All kernel header files should come from local copy of sanitized headers, rather than relying on what Linux distribution ships. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-05-08uapi: update kernel headers 6.4-rc1Stephen Hemminger3-5/+7
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-04-29Merge git://git.kernel.org/pub/scm/network/iproute2/iproute2-nextStephen Hemminger10-14/+145
2023-04-27v6.3.0v6.3.0Stephen Hemminger1-1/+1
2023-04-24utils: add max() definitionVladimir Oltean1-0/+8
There is already a min() definition, add this below it. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2023-04-22Update kernel headersDavid Ahern5-11/+88
Update kernel headers to commit: fbc1449d385d ("Merge tag 'mlx5-updates-2023-04-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux") Signed-off-by: David Ahern <dsahern@kernel.org>
2023-04-07Update kernel headersDavid Ahern1-0/+1
Update kernel headers to commit: e28531143b25 ("net: ethernet: mtk_eth_soc: mtk_ppe: prefer newly added l2 flows") Signed-off-by: David Ahern <dsahern@kernel.org>
2023-03-30ip: Support IP address protocolPetr Machata1-0/+2
IPv4 and IPv6 addresses can be assigned a protocol value that indicates the provenance of the IP address. The attribute is modeled after ip route protocols, and essentially allows the administrator or userspace stack to tag addresses in some way that makes sense to the actor in question. Support for this feature was merged with commit 47f0bd503210 ("net: Add new protocol attribute to IP addresses"), for kernel 5.18. In this patch, add support for setting the protocol attribute at IP address addition, replacement, and listing requests. An example session with the feature in action: # ip address add dev d 192.0.2.1/28 proto 0xab # ip address show dev d 26: d: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 06:29:74:fd:1f:eb brd ff:ff:ff:ff:ff:ff inet 192.0.2.1/28 scope global proto 0xab d valid_lft forever preferred_lft forever # ip address replace dev d 192.0.2.1/28 proto 0x11 # ip address show dev d 26: d: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 06:29:74:fd:1f:eb brd ff:ff:ff:ff:ff:ff inet 192.0.2.1/28 scope global proto 0x11 d valid_lft forever preferred_lft forever A JSON dump. The protocol value is always provided as a string, even in numeric mode, to provide a consistent interface. # ip -j address show dev d | jq [ { "ifindex": 26, "ifname": "d", "flags": [ "BROADCAST", "NOARP" ], "mtu": 1500, "qdisc": "noop", "operstate": "DOWN", "group": "default", "txqlen": 1000, "link_type": "ether", "address": "06:29:74:fd:1f:eb", "broadcast": "ff:ff:ff:ff:ff:ff", "addr_info": [ { "family": "inet", "local": "192.0.2.1", "prefixlen": 28, "scope": "global", "protocol": "0x11", "label": "d", "valid_life_time": 4294967295, "preferred_life_time": 4294967295 } ] } ] Signed-off-by: Petr Machata <petrm@nvidia.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2023-03-30Update kernel headersDavid Ahern1-0/+1
Update kernel headers to commit: da617cd8d906 ("smsc911x: remove superfluous variable init") Signed-off-by: David Ahern <dsahern@kernel.org>
2023-03-23Update kernel headersDavid Ahern6-5/+65
Update kernel headers to commit: fcb3a4653bc5 ("net/sched: act_api: use the correct TCA_ACT attributes in dump") Signed-off-by: David Ahern <dsahern@kernel.org>
2023-03-18uapi: update headers from 6.3-rc2Stephen Hemminger2-1/+2
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-03-12uapi: update license of fou.hStephen Hemminger1-1/+1
Upstream 6.2-rc2 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-02-22uapi: update bpf.h from upstreamStephen Hemminger1-1/+18
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-02-22Merge branch 'main' into nextDavid Ahern1-1/+1
Signed-off-by: David Ahern <dsahern@kernel.org>
2023-02-20v6.2.0v6.2.0Stephen Hemminger1-1/+1
2023-02-18Merge remote-tracking branch 'main/main' into nextDavid Ahern1-0/+1
Signed-off-by: David Ahern <dsahern@kernel.org>
2023-02-13uapi: update headers to 6.2-rc8Stephen Hemminger1-0/+1
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-02-07Update kernel headersDavid Ahern7-28/+50
Update kernel headers to commit: 61d731e6538d ("Merge tag 'linux-can-next-for-6.3-20230206' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next") Signed-off-by: David Ahern <dsahern@kernel.org>
2023-01-22Update kernel headersDavid Ahern5-3/+10
Update kernel headers to commit a7b87d2a31dc ("Merge branch 'mlxsw-add-support-of-latency-tlv'") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-12-26uapi: update headers to 6.2-rc1Stephen Hemminger1-0/+1
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-12-16Merge branch 'main' into nextDavid Ahern1-1/+1
Conflicts: devlink/devlink.c Signed-off-by: David Ahern <dsahern@kernel.org>
2022-12-14fix version #v6.1.0Stephen Hemminger1-1/+1
2022-12-14Update kernel headersDavid Ahern7-4/+52
Update kernel headers to commit: 7e68dd7d07a2 ("Merge tag 'net-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-12-12v6.1.0Stephen Hemminger1-1/+1
2022-12-08libnetlink: Fix wrong netlink header placementIdo Schimmel1-1/+1
The netlink header must be first in the netlink message, so move it there. Fixes: fee4a56f0191 ("Update kernel headers") Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2022-12-02Update kernel headersDavid Ahern8-15/+47
Update kernel headers to commit: dbadae927287 ("tsnep: Rework RX buffer allocation") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-11-22uapi: update for in.h and ip.hStephen Hemminger2-2/+5
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-11-13Merge branch 'main' into nextDavid Ahern1-1/+1
Conflicts: include/uapi/linux/bpf.h Signed-off-by: David Ahern <dsahern@kernel.org>
2022-11-07Update kernel headersDavid Ahern8-220/+355
Update kernel headers to commit: bf46390f39c6 ("Merge branch 'genetlink-per-op-type-policies'") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-10-11uapi: update from 6.1 pre rc1Stephen Hemminger1-6/+60
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-10-11Merge branch 'merge' of ../iproute2-nextStephen Hemminger22-82/+282
2022-10-04v6.0.0v6.0.0Stephen Hemminger1-1/+1
2022-10-03Update kernel headersDavid Ahern2-0/+11
Update kernel headers to commit: 62c07983bef9 ("once: add DO_ONCE_SLOW() for sleepable contexts") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-10-02Update kernel headersDavid Ahern9-35/+45
Update kernel headers to commit: bc37b24ee05e ("Merge branch 'mlx5-xsk-updates-part3-2022-09-30'") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-09-30uapi: update of if_tun.hStephen Hemminger1-0/+2
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-09-29rtnetlink: add new function rtnl_echo_talk()Hangbin Liu1-0/+3
Add a new function rtnl_echo_talk() that could be used when the sub-component supports NLM_F_ECHO flag. With this function we can remove the redundant code added by commit b264b4c6568c7 ("ip: add NLM_F_ECHO support"). Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2022-09-27libnetlink: add offset for nl_dump_ext_ack_doneHangbin Liu1-1/+1
There is no rule to have an error code after NLMSG_DONE msg. The only reason we has this offset is that kernel function netlink_dump_done() has an error code followed by the netlink message header. Making nl_dump_ext_ack_done() has an offset parameter. So we can adjust this for NLMSG_DONE message without error code. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2022-09-22ip: add NLM_F_ECHO supportHangbin Liu1-0/+1
When user space configures the kernel with netlink messages, it can set the NLM_F_ECHO flag to request the kernel to send the applied configuration back to the caller. This allows user space to retrieve configuration information that are filled by the kernel (either because these parameters can only be set by the kernel or because user space let the kernel choose a default value). NLM_F_ACK is also supplied incase the kernel doesn't support NLM_F_ECHO and we will wait for the reply forever. Just like the update in iplink.c, which I plan to post a patch to kernel later. A new parameter -echo is added when user want to get feedback from kernel. e.g. # ip -echo addr add 192.168.0.1/24 dev eth1 3: eth1 inet 192.168.0.1/24 scope global eth1 valid_lft forever preferred_lft forever # ip -j -p -echo addr del 192.168.0.1/24 dev eth1 [ { "deleted": true, "index": 3, "dev": "eth1", "family": "inet", "local": "192.168.0.1", "prefixlen": 24, "scope": "global", "label": "eth1", "valid_life_time": 4294967295, "preferred_life_time": 4294967295 } ] Suggested-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2022-09-22Update kernel headersDavid Ahern10-44/+176
Update kernel headers to commit: 0140a7168f8b ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-09-20uapi: update bpf and virtio_netStephen Hemminger2-8/+8
Update headers based on 6.0-rc6 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-08-31utils: extract CTRL_ATTR_MAXATTR and save itJacob Keller1-0/+1
mnlu_gen_socket_open opens a socket and configures it for use with a generic netlink family. As part of this process it sends a CTRL_CMD_GETFAMILY to get the ID for the family name requested. In addition to the family id, this command reports a few other useful values including the maximum attribute. The maximum attribute is useful in order to know whether a given attribute is supported and for knowing the necessary size to allocate for other operations such as policy dumping. Since we already have to issue a CTRL_CMD_GETFAMILY to get the id, we can also store the maximum attribute as well. Modify the callback functions to parse the maximum attribute NLA and store it in the mnlu_gen_socket structure. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2022-08-31Update kernel headersDavid Ahern20-44/+122
Update kernel headers to commit: cb45a8bf4693 ("net: axienet: Switch to 64-bit RX/TX statistics") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-08-31uapi: update headers for xfrm and virtio_ring.hStephen Hemminger1-1/+1
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-08-14uapi: update headers from 6.0-rc1Stephen Hemminger18-33/+67
These are the post-merge of netwoking user headers. Note: this fixes compilation with gcc-12 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-08-04Merge branch 'main' into nextDavid Ahern1-1/+1
Signed-off-by: David Ahern <dsahern@kernel.org>
2022-08-02v5.19.0v5.19.0Stephen Hemminger1-1/+1
2022-07-30Update kernel headersDavid Ahern5-8/+42
Update kernel headers to commit 63757225a933 ("Merge tag 'mlx5-updates-2022-07-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-07-29f_flower: Introduce PPPoE supportWojciech Drewek1-0/+3
Introduce PPPoE specific fields in tc-flower: - session id (16 bits) - ppp protocol (16 bits) Those fields can be provided only when protocol was set to ETH_P_PPP_SES. ppp_proto works similar to vlan_ethtype, i.e. ppp_proto overwrites eth_type. Thanks to that, fields from encapsulated protocols (such as src_ip) can be specified. e.g. # tc filter add dev ens6f0 ingress prio 1 protocol ppp_ses \ flower \ pppoe_sid 1234 \ ppp_proto ip \ dst_ip 127.0.0.1 \ src_ip 127.0.0.2 \ action drop Vlan and cvlan is also supported, in this case cvlan_ethtype or vlan_ethtype has to be set to ETH_P_PPP_SES. e.g. # tc filter add dev ens6f0 ingress prio 1 protocol 802.1Q \ flower \ vlan_id 2 \ vlan_ethtype ppp_ses \ pppoe_sid 1234 \ ppp_proto ip \ dst_ip 127.0.0.1 \ src_ip 127.0.0.2 \ action drop Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com> Acked-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2022-07-29lib: Introduce ppp protocolsWojciech Drewek1-0/+3
PPP protocol field uses different values than ethertype. Introduce utilities for translating PPP protocols from strings to values and vice versa. Use generic API from utils in order to get proto id and name. Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com> Acked-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2022-07-29lib: refactor ll_proto functionsWojciech Drewek1-0/+10
Move core logic of ll_proto_n2a and ll_proto_a2n to utils.c and make it more generic by allowing to pass table of protocols as argument (proto_tb). Introduce struct proto with protocol ID and name to allow this. This wil allow to use those functions by other use cases. Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com> Acked-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2022-07-29Import posix_types.h uapi file from point of last kernel headers syncDavid Ahern1-0/+99
__kernel_old_time_t definition is needed for pppoe-in-flower patches. Signed-off-by: David Ahern <dsahern@kernel.org>
2022-07-28Import ppp_defs.h uapi file from point of last kernel headers syncDavid Ahern1-0/+165
ppp_defs header file is needed by PPPoE in flower support. Signed-off-by: David Ahern <dsahern@kernel.org>
2022-07-21Update kernel headersDavid Ahern5-4/+18
Update kernel headers to commit: 5588d6280270 ("net/cdc_ncm: Increase NTB max RX/TX values to 64kb") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-07-18vdpa: update uapi headers from 5.19-rc7Stephen Hemminger1-242/+0
Keep VDPA sanitized headers up to current kernel. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-07-18Revert "uapi: add vdpa.h"Stephen Hemminger1-59/+0
This reverts commit 291898c5ff881d0dc5d947031def0528101476cb.
2022-07-18uapi: add virtio_ring.hStephen Hemminger1-0/+242
When vdpa was updated, it included linux/virtio_ring.h but that sanitized header file was not added. Fixes: bd91c7647189 ("vdpa: Allow for printing negotiated features of a device") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-07-18uapi: add vdpa.hStephen Hemminger1-0/+59
Iproute2 depends on kernel headers and all necessary kernel headers should be in iproute tree. Fixes: c2ecc82b9d4c ("vdpa: Add vdpa tool") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-07-16uapi: update bpf.hStephen Hemminger1-4/+7
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-07-08libbpf: add xdp program name supportHangbin Liu1-0/+1
In bpf program, only the program name is unique. Before this patch, if there are multiple programs with the same section name, only the first program will be attached. With program name support, users could specify the exact program they want to attach. Note this feature is only supported when iproute2 build with libbpf. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2022-07-06Merge branch 'main' into nextDavid Ahern1-2/+3
Signed-off-by: David Ahern <dsahern@kernel.org>
2022-07-01uapi: update mptcp.hStephen Hemminger1-2/+3
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-06-26Update kernel headersDavid Ahern3-7/+99
Update kernel headers to commit: ebeae54d3a77 ("net: pcs: xpcs: depends on PHYLINK in Kconfig") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-06-17uapi: change name for zerocopy sendfile in tlsStephen Hemminger1-2/+2
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-06-17uapi: update socket.hStephen Hemminger2-1/+2
From 5.19-rc0 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-06-12Update kernel headersDavid Ahern3-3/+4
Update kernel headers to commit: 27f2533bcc6e ("nfp: flower: support to offload pedit of IPv6 flowinto fields") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-05-26Merge git://git.kernel.org/pub/scm/network/iproute2/iproute2-nextStephen Hemminger12-3/+196
2022-05-26v5.18.0v5.18.0Stephen Hemminger1-1/+1
2022-05-13uapi: update of virtio_idsStephen Hemminger1-7/+7
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-05-13Update kernel headersDavid Ahern4-12/+27
Update kernel headers to commit: a65cc8435540 ("Merge branch 'bnxt_en-next'") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-05-08bridge: vni: add support for stats dumpingNikolay Aleksandrov1-1/+2
Add support for "-s" option which causes bridge vni to dump per-vni statistics. Note that it disables vni range compression. Example: $ bridge -s vni | more dev vni group/remote vxlan0 1024 239.1.1.1 RX: bytes 0 pkts 0 drops 0 errors 0 TX: bytes 0 pkts 0 drops 0 errors 0 1025 239.1.1.1 RX: bytes 0 pkts 0 drops 0 errors 0 TX: bytes 0 pkts 0 drops 0 errors 0 Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com> Signed-off-by: Roopa Prabhu <roopa@nvidia.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2022-05-08bridge: vxlan device vnifilter supportRoopa Prabhu1-0/+8
This patch adds bridge command to manage recently added vnifilter on a collect metadata vxlan device. examples: $bridge vni add dev vxlan0 vni 400 $bridge vni add dev vxlan0 vni 200 group 239.1.1.101 $bridge vni del dev vxlan0 vni 400 $bridge vni show $bridge -s vni show Signed-off-by: Roopa Prabhu <roopa@nvidia.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2022-04-27libnetlink: Add filtering to rtnl_statsdump_req_filter()Petr Machata1-1/+10
A number of functions in the rtnl_*_req family accept a caller-provided callback to set up arbitrary filtering. rtnl_statsdump_req_filter() currently only allows setting a field in the IFSM header, not custom attributes. So far these were not necessary, but with introduction of more detailed filtering settings, the callback becomes necessary. To that end, add a filter_fn and filter_data arguments to the function. Unlike the other filters, this one is typed to expect an IFSM pointer, to permit tweaking the header itself as well. Pass NULLs in the existing callers. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: David Ahern <dsahern@kernel.org>
2022-04-25Update kernel headersDavid Ahern11-30/+110
Update kernel headers to commit: cc271ab86606 ("wwan_hwsim: Avoid flush_scheduled_work() usage") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-04-18uapi: upstream update to stddef.hStephen Hemminger1-0/+4
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-04-06uapi: update from 5.18-rc1Stephen Hemminger3-28/+64
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-03-24Merge branch 'main' into nextDavid Ahern1-1/+1
Signed-off-by: David Ahern <dsahern@kernel.org>
2022-03-22v5.17.0v5.17.0Stephen Hemminger1-1/+1
2022-03-20Update kernel headersDavid Ahern6-1/+41
Update kernel headers to commit: 092d992b76ed ("Merge tag 'mlx5-updates-2022-03-18' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-03-12Merge branch 'main' into nextDavid Ahern2-1/+2
Signed-off-by: David Ahern <dsahern@kernel.org>
2022-03-11lib/fs: fix memory leak in get_task_name()Andrea Claudi1-1/+1
asprintf() allocates memory which is not freed on the error path of get_task_name(), thus potentially leading to memory leaks. %m specifier on fscanf allocates memory, too, which needs to be freed by the caller. This reworks get_task_name() to avoid memory allocation. - Pass a buffer and its length to the function, similarly to what get_command_name() does, thus avoiding to allocate memory for the string to be returned; - Use snprintf() instead of asprintf(); - Use fgets() instead of fscanf() to limit string length. Fixes: 81bfd01a4c9e ("lib: move get_task_name() from rdma") Signed-off-by: Andrea Claudi <aclaudi@redhat.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-03-11Import batman_adv.h header from last kernel sync pointDavid Ahern1-0/+704
Signed-off-by: David Ahern <dsahern@kernel.org>
2022-03-10uapi: update magic.hStephen Hemminger1-0/+1
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-03-07bpf: Export bpf syscall wrapperDavid Ahern1-0/+2
Move bpf syscall wrapper to bpf_glue to make it available to libbpf based functions. Signed-off-by: David Ahern <dsahern@kernel.org>
2022-03-04uapi: update to xfrm.hStephen Hemminger1-0/+6
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-03-04Update kernel headersDavid Ahern5-1/+148
Update kernel headers to commit: 1039135aedfc ("net: ethernet: sun: Remove redundant code") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-02-21Update kernel headersDavid Ahern2-1/+9
Update kernel headers to commit: 7b779cc8846a ("Merge branch 'octeontx2-ptp-updates'") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-02-10Update kernel headersDavid Ahern3-2/+91
Update kernel headers to commit: d8c2858181cc ("net/switchdev: use struct_size over open coded arithmetic") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-01-26utils: add format attributeStephen Hemminger1-1/+3
One more format attribute needed to resolve clang warnings. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David Ahern <dsahern@kernel.org>
2022-01-24uapi: update kernel headers from 5.17-rc1Stephen Hemminger1-0/+6
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-01-15uapi: add missing virtio headersStephen Hemminger2-0/+139
These headers are referred to by virtio_net but were not in uapi directory. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-01-15uapi: add missing rose and ax25 filesStephen Hemminger2-0/+208
All iproute2 headers should come from sanitized kernel headers not the local system. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-01-12Update kernel headersDavid Ahern7-3/+64
Update kernel headers to commit: fe8152b38d3a ("Merge tag 'devprop-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm") Signed-off-by: David Ahern <dsahern@kernel.org>
2022-01-11Merge branch 'main' into nextDavid Ahern1-1/+1
Signed-off-by: David Ahern <dsahern@kernel.org>
2022-01-10v5.16.0v5.16.0Stephen Hemminger1-1/+1
2021-12-18Update kernel headers and import virtio_netDavid Ahern3-10/+471
Update kernel headers to commit: f85b244ee395 ("xdp: move the if dev statements to the first") and import virtio_net.h for vdpa. Signed-off-by: David Ahern <dsahern@kernel.org>
2021-12-17uapi: update to mptcp.hStephen Hemminger1-8/+10
From 5.16-rc5 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-12-03uapi: update to if_ether.hStephen Hemminger1-1/+1
Merged from 5.16-rc3 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-12-03Update kernel headersDavid Ahern4-2/+25
Update kernel headers to commit: bb14bfc7eb92 ("net: lan966x: fix a IS_ERR() vs NULL check in lan966x_create_targets()") Signed-off-by: David Ahern <dsahern@kernel.org>
2021-11-18vdpa: align uapi headersStephen Hemminger1-47/+0
Update vdpa headers based on 5.16.0-rc1 and remove redundant copy. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-11-18vdpa: Remove duplicate vdpa UAPI header fileParav Pandit1-40/+0
vdpa header file is already present in the tree at vdpa/include/uapi/linux/vdpa.h and used by vdpa/vdpa.c. As we discussed in thread [1] vdpa header comes from a different tree, similar to rdma subsystem. Hence remove the duplicate vdpa UAPI header file. [1] https://www.spinics.net/lists/netdev/msg748458.html Fixes: b5a6ed9cc9fc ("uapi: add missing virtio related headers") Signed-off-by: Parav Pandit <parav@nvidia.com> Signed-off-by: David Ahern <dsahern@gmail.com>
2021-11-09uapi: update vdpa.hStephen Hemminger1-0/+7
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-11-04Merge branch 'main' into nextDavid Ahern1-1/+1
Signed-off-by: David Ahern <dsahern@kernel.org>
2021-11-03Import amt.hDavid Ahern1-0/+62
Impor amt.h uapi from last kernel sync point Signed-off-by: David Ahern <dsahern@kernel.org>
2021-11-03Update kernel headersDavid Ahern8-7/+109
Update kernel headers to commit: cc0356d6a02e ("Merge tag 'x86_core_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") Signed-off-by: David Ahern <dsahern@kernel.org>
2021-11-01v5.15.0v5.15.0Stephen Hemminger1-1/+1
2021-10-15uapi: pickup fix for xfrm ABI breakageStephen Hemminger1-6/+9
See kernel Commit 844f7eaaed9 ("include/uapi/linux/xfrm.h: Fix XFRM_MSG_MAPPING ABI breakage") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-10-15Update kernel headersDavid Ahern4-17/+67
Update kernel headers to commit: 295711fa8fec ("Merge branch 'dpaa2-irq-coalescing'") Signed-off-by: David Ahern <dsahern@kernel.org>
2021-10-05Update kernel headersDavid Ahern5-23/+135
Update kernel headers to commit: 49ed8dde3715 ("net: usb: use eth_hw_addr_set() for dev->addr_len cases") Update to linux/mptcp.h is removed because it breaks compilation of ipmptcp.c in a nontrivial way. Signed-off-by: David Ahern <dsahern@kernel.org>
2021-09-23ROSE: Add rose_ntop implementation.Ralf Baechle1-0/+2
ROSE addresses are ten digit numbers, basically like North American telephone numbers. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David Ahern <dsahern@kernel.org>
2021-09-23NETROM: Add netrom_ntop implementation.Ralf Baechle1-0/+2
NETROM uses AX.25 addresses so this is a simple wrapper around ax25_ntop1. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David Ahern <dsahern@kernel.org>
2021-09-23AX.25: Add ax25_ntop implementation.Ralf Baechle1-0/+2
AX.25 addresses are based on Amateur radio callsigns followed by an SSID like XXXXXX-SS where the callsign is up to 6 characters which are either letters or digits and the SSID is a decimal number in the range 0..15. Amateur radio callsigns are assigned by a country's relevant authorities and are 3..6 characters though a few countries have assigned callsigns longer than that. AX.25 is not able to handle such longer callsigns. Being based on HDLC AX.25 encodes addresses by shifting them one bit left thus zeroing bit 0, the HDLC extension bit for all but the last bit of a packet's address field but for our purposes here we're not considering the HDLC extension bit that is it will always be zero. Linux' internal representation of AX.25 addresses in Linux is very similar to this on the on-air or on-the-wire format. The callsign is padded to 6 octets by adding spaces, followed by the SSID octet then all 7 octets are left-shifted by one byte. This for example turns "LINUX-1" where the callsign is LINUX and SSID is 1 into 98:92:9c:aa:b0:40:02. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David Ahern <dsahern@kernel.org>
2021-09-13uapi: updates from 5.15-rc1Stephen Hemminger2-0/+13
Small changes to virtio etc. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-09-01ip: remove leftovers from IPX and DECnetStephen Hemminger1-11/+0
Iproute2 has not supported DECnet or IPX since version 5.0. There were some leftover support in the ip options flags and parsing, remove these. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-09-01uapi: update headers from 5.15 mergeStephen Hemminger6-2/+63
New headers from 5.15 early merge. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-09-01Update kernel headersDavid Ahern4-5/+36
Update kernel headers to commit: 88be32634905 ("Merge branch 'dsa-tagger-helpers'") Signed-off-by: David Ahern <dsahern@kernel.org>
2021-09-01Import ioam6 uapi headersDavid Ahern3-0/+205
Import ioam6 uapi headers from kernel headers at last sync commit. Signed-off-by: David Ahern <dsahern@kernel.org>
2021-09-01Update kernel headersDavid Ahern10-9/+133
Update kernel headers to commit: 1187c8c4642d ("net: phy: mscc: make some arrays static const, makes object smaller") Signed-off-by: David Ahern <dsahern@kernel.org>
2021-08-31v5.14.0v5.14.0Stephen Hemminger1-1/+1
2021-08-18uapi: update neighbour.hStephen Hemminger1-2/+5
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-07-17uapi: headers updateStephen Hemminger2-0/+13
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-07-07ip route: ignore ENOENT during save if RT_TABLE_MAIN is being dumpedAlexander Mikhalitsyn1-0/+32
We started to use in-kernel filtering feature which allows to get only needed tables (see iproute_dump_filter()). From the kernel side it's implemented in net/ipv4/fib_frontend.c (inet_dump_fib), net/ipv6/ip6_fib.c (inet6_dump_fib). The problem here is that behaviour of "ip route save" was changed after c7e6371bc ("ip route: Add protocol, table id and device to dump request"). If filters are used, then kernel returns ENOENT error if requested table is absent, but in newly created net namespace even RT_TABLE_MAIN table doesn't exist. It is really allocated, for instance, after issuing "ip l set lo up". Reproducer is fairly simple: $ unshare -n ip route save > dump Error: ipv4: FIB table does not exist. Dump terminated Expected result here is to get empty dump file (as it was before this change). v2: reworked, so, now it takes into account NLMSGERR_ATTR_MSG (see nl_dump_ext_ack_done() function). We want to suppress error messages in stderr about absent FIB table from kernel too. v3: reworked to make code clearer. Introduced rtnl_suppressed_errors(), rtnl_suppress_error() helpers. User may suppress up to 3 errors (may be easily extended by changing SUPPRESS_ERRORS_INIT macro). v4: reworked, rtnl_dump_filter_errhndlr() was introduced. Thanks to Stephen Hemminger for comments and suggestions v5: space fixes, commit message reformat, empty initializers Fixes: c7e6371bc ("ip route: Add protocol, table id and device to dump request") Cc: David Ahern <dsahern@gmail.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Cc: Andrei Vagin <avagin@gmail.com> Cc: Alexander Mikhalitsyn <alexander@mihalicyn.com> Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-07-06uapi: update kernel headers from 5.14-rc1Stephen Hemminger2-0/+10
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-07-01Merge branch 'main' into nextDavid Ahern2-2/+3
Signed-off-by: David Ahern <dsahern@kernel.org>
2021-06-29v5.13.0v5.13.0Stephen Hemminger1-1/+1
2021-06-29utils: Fix BIT() to support up to 64 bits on all architecturesBen Hutchings1-1/+2
devlink and vdpa use BIT() together with 64-bit flag fields. devlink is already using bit numbers greater than 31 and so does not work correctly on 32-bit architectures. Fix this by making BIT() use uint64_t instead of unsigned long. Signed-off-by: Ben Hutchings <ben.hutchings@mind.be> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-06-28uapi: update headers to 5.13Stephen Hemminger1-0/+3
Final 5.13 header update Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-06-26Import wwan.h uapi fileDavid Ahern1-0/+16
Import wwan.h uapi file at version from last kernel headers sync. Signed-off-by: David Ahern <dsahern@kernel.org>
2021-06-22Update kernel headersDavid Ahern5-2/+54
Update kernel headers to commit: ef2c3ddaa4ed ("ibmvnic: Use strscpy() instead of strncpy()") Signed-off-by: David Ahern <dsahern@kernel.org>
2021-06-18utils: bump max args number to 512 for batch filesGuillaume Nault1-0/+3
Large tc filters can have many arguments. For example the following filter matches the first 7 MPLS LSEs, pops all of them, then updates the Ethernet header and redirects the resulting packet to eth1. filter add dev eth0 ingress handle 44 priority 100 \ protocol mpls_uc flower mpls \ lse depth 1 label 1040076 tc 4 bos 0 ttl 175 \ lse depth 2 label 89648 tc 2 bos 0 ttl 9 \ lse depth 3 label 63417 tc 5 bos 0 ttl 185 \ lse depth 4 label 593135 tc 5 bos 0 ttl 67 \ lse depth 5 label 857021 tc 0 bos 0 ttl 181 \ lse depth 6 label 239239 tc 1 bos 0 ttl 254 \ lse depth 7 label 30 tc 7 bos 1 ttl 237 \ action mpls pop protocol mpls_uc pipe \ action mpls pop protocol mpls_uc pipe \ action mpls pop protocol mpls_uc pipe \ action mpls pop protocol mpls_uc pipe \ action mpls pop protocol mpls_uc pipe \ action mpls pop protocol mpls_uc pipe \ action mpls pop protocol ipv6 pipe \ action vlan pop_eth pipe \ action vlan push_eth \ dst_mac 00:00:5e:00:53:7e \ src_mac 00:00:5e:00:53:03 pipe \ action mirred egress redirect dev eth1 This filter has 149 arguments, so it can't be used with tc -batch which is limited to a 100. Let's bump the limit to 512. That should leave a lot of room for big batch commands. v2: -Define the limit in utils.h (Stephen Hemminger) -Bump the limit even higher (256 -> 512) (Stephen Hemminger) Signed-off-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: David Ahern <dsahern@kernel.org>