Commit Graph

54 Commits

Author SHA1 Message Date
Florian Westphal 6f00fd9b7c sd-netlink: add nfnetlink/nftables type system
Will be used by upcoming nftables support -- it will use the netlink
interface directly rather than add another library dependency.
2020-12-16 00:35:56 +01:00
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Yu Watanabe 1034044260
Merge pull request #15050 from ssahani/fq-pie
network: tc: add support for FQ-PIE packet scheduler
2020-09-18 03:50:02 +09:00
Susant Sahani 3428b32a04 sd-netlink: add fq pie options 2020-09-17 17:06:47 +09:00
Susant Sahani af818d0344 sd-netlink: Add support for bare UDP 2020-09-17 14:51:47 +09:00
Yu Watanabe 4dec921889 sd-netlink: add netlink properties of Enhanced Transmission Selection (ETS) 2020-06-19 00:47:55 +09:00
Susant Sahani c33f1e5a3f sd-netlink: add netlink properties of Quick Fair Queueing (QFQ) 2020-06-03 13:41:44 +09:00
Susant Sahani 7e16f84ea2 sd-netlink: add HHF netlink property 2020-03-12 15:39:12 +09:00
Susant Sahani 5c21b46e49 sd-netlink: add DRR netlink properties 2020-03-12 15:35:51 +09:00
Susant Sahani 55d228311b sd-netlink: add support for PIE 2020-03-12 13:58:35 +09:00
Susant Sahani ad8352f4ff network: tc: introduce cake
CAKE (Common Applications Kept Enhanced)

Please see http://man7.org/linux/man-pages/man8/tc-cake.8.html
2020-03-02 15:59:37 +09:00
Susant Sahani aa550d2a51 sd-netlink: introduce sd_netlink_message_append_s8() and friends 2020-03-02 15:59:32 +09:00
Susant Sahani 982998b087 network: TC introduce sfb - Stochastic Fair Blue
Please see https://www.systutorials.com/docs/linux/man/8-tc-sfb/
2020-03-02 15:48:24 +09:00
Susant Sahani 609e8340bb network: TC introduce GRED, Generic Random Early Detection
http://tldp.org/en/Traffic-Control-HOWTO/ar01s06.html
2020-03-02 15:48:24 +09:00
Yu Watanabe b934ac3d6e network: tc: support Hierarchy Token Bucket (HTB) 2020-03-02 15:46:28 +09:00
Susant Sahani a9a5d632da network: tc introduce codel
Please see http://man7.org/linux/man-pages/man8/tc-codel.8.html
2019-12-28 21:35:39 +09:00
Yu Watanabe eb34f4b3d2 sd-netlink: add attributes for FQ 2019-12-12 16:23:26 +09:00
Yu Watanabe 42b5f7dd32 sd-netlink: make TCA_OPTIONS take NETLINK_TYPE_UNION 2019-12-11 16:30:39 +09:00
Susant Sahani cec1552ad4 sd-netlink: add support for ifb device 2019-12-07 14:35:23 +01:00
Yu Watanabe 4e8f0ef921 sd-netlink: save dynamic general netlink message type 2019-10-15 01:57:19 +09:00
Yu Watanabe 2cac03f71d sd-netlink: drop unnecessarily exported variables 2019-10-15 01:57:19 +09:00
1848 98d20a17a9 Added support for xfrm interfaces 2019-07-10 23:02:19 +09:00
Yu Watanabe d61e4c5b6e network: add nlmon support
nlmon is a Netlink monitor device.
2019-05-28 22:47:15 +09:00
Susant Sahani 69c317a07f networkd: introduce netdev ipvtap
This patch adds netdev ipvtap that is based on the
IP-VLAN network interface, called ipvtap. An ipvtap device can be created
in the same way as an ipvlan device, using 'kind ipvtap', and then accessed
using the tap user space interface.
2019-05-16 09:48:53 +09:00
Susant Sahani 81962db798 network: Introduce MACsec
Media Access Control Security (MACsec) is an 802.1AE IEEE
industry-standard security technology that provides secure
communication for all traffic on Ethernet links.
MACsec provides point-to-point security on Ethernet links between
directly connected nodes and is capable of identifying and preventing
most security threats, including denial of service, intrusion,
man-in-the-middle, masquerading, passive wiretapping, and playback attacks.

Closes #5754
2019-04-12 10:12:41 +09:00
Yu Watanabe abd48ec87f sd-netlink: introduce sd_netlink_message_append_sockaddr_in{,6}() 2019-01-28 12:19:29 +01:00
Susant Sahani 2266864b04 networkd: Add support for ERSPAN tunnel
Please see: https://patchwork.ozlabs.org/patch/800327/
```
[NetDev]
Name=erspan-test
Kind=erspan

[Tunnel]
Independent=true
ERSPANIndex=123
Local = 172.16.1.200
Remote = 172.16.1.100
Key=101
SerializeTunneledPackets=true
```
2018-11-27 11:04:42 +09:00
Yu Watanabe afb76fdbff tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
Zbigniew Jędrzejewski-Szmek d9b02e1697 tree-wide: drop copyright headers from frequent contributors
Fixes #9320.

for p in Shapovalov Chevalier Rozhkov Sievers Mack Herrmann Schmidt Rudenberg Sahani Landden Andersen Watanabe; do
  git grep -e 'Copyright.*'$p -l|xargs perl -i -0pe 's|/([*][*])?[*]\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\s*[*]([*][*])?/\n*|\n|gms; s|\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\n*|\n|gms'
done
2018-06-20 11:58:53 +02:00
Lennart Poettering 96b2fb93c5 tree-wide: beautify remaining copyright statements
Let's unify an beautify our remaining copyright statements, with a
unicode ©. This means our copyright statements are now always formatted
the same way. Yay.
2018-06-14 10:20:21 +02:00
Lennart Poettering 818bf54632 tree-wide: drop 'This file is part of systemd' blurb
This part of the copyright blurb stems from the GPL use recommendations:

https://www.gnu.org/licenses/gpl-howto.en.html

The concept appears to originate in times where version control was per
file, instead of per tree, and was a way to glue the files together.
Ultimately, we nowadays don't live in that world anymore, and this
information is entirely useless anyway, as people are very welcome to
copy these files into any projects they like, and they shouldn't have to
change bits that are part of our copyright header for that.

hence, let's just get rid of this old cruft, and shorten our codebase a
bit.
2018-06-14 10:20:20 +02:00
Hiram van Paassen 06828bb617 networkd-link: add support to configure CAN interfaces
This patch adds support for kind "can". Fixes: #4042.
2018-06-09 15:12:31 +02:00
Susant Sahani 56e7fb5088 networkd: introduce netdev "Netdevsim" Driver
This "netdevsim" as implied by the name is a tool for network developers and is a simulator.
This simulated networking device is used for testing various networking APIs and at this time
is particularly focused on testing hardware offloading related interfaces.
2018-06-03 08:16:11 +05:30
Zbigniew Jędrzejewski-Szmek 11a1589223 tree-wide: drop license boilerplate
Files which are installed as-is (any .service and other unit files, .conf
files, .policy files, etc), are left as is. My assumption is that SPDX
identifiers are not yet that well known, so it's better to retain the
extended header to avoid any doubt.

I also kept any copyright lines. We can probably remove them, but it'd nice to
obtain explicit acks from all involved authors before doing that.
2018-04-06 18:58:55 +02:00
Jörg Thalheim e5719363f5 networkd: add support for wireguard interface type
More information may be found at wireguard.com.
2018-01-09 14:00:49 +01:00
Jörg Thalheim 05d0c2e3cf sd-netlink: add generic netlink support
This also adds the ability to incorporate arrays into netlink messages
and to determine when a netlink message is too big, used by some generic
netlink protocols.
2018-01-09 14:00:49 +01:00
Susant Sahani d6df583c87 networkd: introduce vxcan netdev. (#7150)
Similar to the virtual ethernet driver veth, vxcan implements a
local CAN traffic tunnel between two virtual CAN network devices.
When creating a vxcan, two vxcan devices are created as pair
When one end receives the packet it appears on its pair and vice
versa. The vxcan can be used for cross namespace communication.
2017-11-22 08:23:22 +01:00
Zbigniew Jędrzejewski-Szmek 53e1b68390 Add SPDX license identifiers to source files under the LGPL
This follows what the kernel is doing, c.f.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
2017-11-19 19:08:15 +01:00
Susant Sahani ca5e80712e sd-netlink: Add Geneve properties to netlink 2017-04-25 09:44:28 +05:30
Susant Sahani 92c918b06d networkd: add support to configure virtual CAN device (#4139)
1. add support for kind vcan
2. fixup indention netlink-types.c, networkd-netdev.c
2016-09-14 18:15:16 +02:00
Andreas Rammhold 20897a0d6e networkd: added support for vrf interfaces (#3316) 2016-06-16 00:25:06 +02:00
Daniel Mack b26fa1a2fb tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file.
2016-02-10 13:41:57 +01:00
Thomas Hindoe Paaboel Andersen ab5dfda78f tree-wide: add missing includes
Add a few includes that we rely on to be include already.
2015-11-16 22:08:33 +01:00
Susant Sahani de566208ee sd-netlink: add support for new type NETLINK_TYPE_FLAG
NETLINK_TYPE_FLAG is NLA_FLAG.

This new type will be used in NLA_FLAG for example

IFLA_VXLAN_GBP  and IFLA_VXLAN_REMCSUM_NOPARTIAL
2015-07-29 11:29:04 +05:30
Susant Sahani d13125752d sd-netlink: Add macvtap support 2015-07-27 11:18:07 +05:30
David Herrmann dd906398dd sd-netlink: don't export internal type-system details
The kernel bonding layer allows passing an array of ARP IP targets as
bond-configuration. Due to the weird implementation of arrays in netlink
(which we haven't figure out a generic way to support, yet), we usually
hard-code the supported array-sizes. However, this should not be exported
from sd-netlink.

Instead, make sure the caller just uses it's current hack of enumerating
the types, and the sd-netlink core will have it's own list of supported
array-sizes (to be removed in future extensions, btw!). If either does not
match, we will just return a normal error.

Note that we provide 2 constants for ARP_IP_TARGETS_MAX now. However, both
have very different reasons:
 - the constant in netdev-bond.c is used to warn the user that the given
   number of targets might not be supported by the kernel (even though the
   kernel might increase that number at _any_ time)
 - the constant in sd-netlink is solely used due to us missing a proper
   array implementation. Once that's supported in the type-system, it can
   be removed without notice

Last but not least, this patch turns the log_error() into a log_warning().
Given that the previous condition was off-by-one, anyway, it never hit at
the right time. Thus, it was probably of no real use.
2015-06-24 13:46:15 +02:00
David Herrmann 846a6b3d89 sd-netlink: don't treat NULL as root type-system
Explicitly export the root type-system to the type-system callers. This
avoids treating NULL as root, which for one really looks backwards (NULL
is usually a leaf, not root), and secondly prevents us from properly
debugging calling into non-nested types.

Also rename the root to "type_system_root". Once we support more than
rtnl, well will have to revisit that, anyway.
2015-06-24 13:46:11 +02:00
David Herrmann 979e7eb9cc sd-netlink: drop NETLINK_TYPE_META
The NETLINK_TYPE_META pseudo-type is actually equivalent to an empty
nested type. Drop it and define an empty type-system instead.

This also has the nice side-effect that m->container_type_system[0] is
never NULL (which has really nasty side-effects if you try to read
attributes).
2015-06-24 13:45:56 +02:00
David Herrmann c1df8dee28 sd-netlink: turn 'max' into 'count' to support empty type-systems
Right now we store the maximum type-ID of a type-system. This prevents us
from creating empty type-systems. Store the "count" instead, which should
be treated as max+1.

Note that type_system_union_protocol_get_type_system() currently has a
nasty hack to treat empty type-systems as invalid. This might need some
modification later on as well.
2015-06-24 13:45:47 +02:00
David Herrmann 435bbb0233 sd-netlink: make NLTypeSystem internal
Same as NLType, move NLTypeSystem into netlink-types.c and hide it from
the outside. Provide an accessor function for the 'max' field that is used
to allocate suitable array sizes.

Note that this will probably be removed later on, anyway. Once we support
bigger type-systems, it just seems impractical to allocate such big arrays
for each container entry. An RBTree would probably do just fine.
2015-06-24 13:45:47 +02:00