summaryrefslogtreecommitdiffstats
path: root/src/network/netdev/ipvlan.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* network/netdev: do not try to update if not supportedYu Watanabe2024-11-141-0/+2
| | | | | Some netdevs cannot update there properties after created. Let's skip requests in that case.
* network/ipvlan: do not try to update MAC addressYu Watanabe2024-10-301-0/+9
|
* tree-wide: drop msg argument for DEFINE_CONFIG_PARSE() macro and friendsYu Watanabe2024-09-011-2/+2
| | | | | This makes the macros use log_syntax_parse_error(), hopefully which provides more informative log message in general, and reduces binary size.
* tree-wide: make sure net/if.h is included before any linux/ headerFrantisek Sumsal2024-04-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The linux/ headers include linux/libc-compat.h that makes sure the linux/ headers won't redeclare symbols already declared by net/if.h, but glibc's net/if.h doesn't do that, so if the include order is reversed we'll end up with a bunch of errors about redeclared stuff: [3/519] Compiling C object test-network-tables.p/src_network_test-network-tables.c.o FAILED: test-network-tables.p/src_network_test-network-tables.c.o cc -Itest-network-tables.p -I. -I.. -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/shared -I../src/shared -Isrc/libsystemd-network -I../src/libsystemd-network -Isrc/network -I../src/network -I../src/network/netdev -I../src/network/tc -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Wno-nonnull-compare -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=strict-flex-arrays -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong -fstrict-flex-arrays --param=ssp-buffer-size=4 -Wno-unused-result -Werror=shadow -fno-strict-aliasing -fstrict-flex-arrays=1 -fvisibility=hidden -fno-omit-frame-pointer -include config.h -pthread -DTEST_CODE=1 -MD -MQ test-network-tables.p/src_network_test-network-tables.c.o -MF test-network-tables.p/src_network_test-network-tables.c.o.d -o test-network-tables.p/src_network_test-network-tables.c.o -c ../src/network/test-network-tables.c In file included from ../src/basic/linux/if_bonding.h:47, from ../src/network/netdev/bond.h:5, from ../src/network/test-network-tables.c:3: ../src/basic/linux/if.h:111:41: error: redeclaration of enumerator ‘IFF_UP’ 111 | #define IFF_UP IFF_UP | ^~~~~~ ../src/basic/linux/if.h:84:9: note: previous definition of ‘IFF_UP’ with type ‘enum net_device_flags’ 84 | IFF_UP = 1<<0, /* sysfs */ | ^~~~~~ ../src/basic/linux/if.h:112:41: error: redeclaration of enumerator ‘IFF_BROADCAST’ 112 | #define IFF_BROADCAST IFF_BROADCAST | ^~~~~~~~~~~~~ ... This also drops remaining workarounds from the last time this issue was brought up (6f270e6bd8) since they shouldn't be needed anymore if the order of the includes is the "correct" one. I also added a comment to each affected include when this is inevitably encountered again in the future. Resolves: #32160
* network: make DEFINE_NETDEV_CAST() assert on input and outputZbigniew Jędrzejewski-Szmek2023-09-221-25/+6
| | | | | | | | | | The macro used to return NULL if input was NULL or had the wrong type. Now it asserts that input is nonnull and it has the expected type. There are a few places where a missing or mismatched type was OK, but in a majority of places, we would do both of the asserts. In various places we'd only do one, but that was by ommission/mistake. So moving the asserts into the macro allows us to save some lines.
* network: assign corresponding NetDev object to LinkYu Watanabe2022-02-251-8/+5
|
* network: replace detailed netlink append messages with a single generic messageZbigniew Jędrzejewski-Szmek2022-01-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is the first in the series, and they generally follow the same idea: we had very detailed logging for message append operations which would only fail either with some type error or intrinsic limit (and then they would fail everywhere, so this would be noticed during development or in CI), or they would fail with ENOMEM, in which case the exact location is not very interesting since this is not repeatable. I am in general in favour of detailed logging messages, because it helps with diagnosis of errors, but I think case is an exception. Despite not being very useful, those messages required a lot of effort, because they were customized for each and every append operation. In fact some of the messages contained copy errors. The text of the messages (since they are generally unique) also added up to a considerable size. This removes the log messages after each sd_netlink_message_append_*() in fill_message_create() with a single line in netdev_create(). As described above, we are just appending fields to a message, so those calls would almost never fail. A forgotten 'return' was added in one place. $ size build/systemd-networkd{.0,} text data bss dec hex filename 1878634 394016 36 2272686 22adae build/systemd-networkd.0 1842450 394080 36 2236566 222096 build/systemd-networkd … so we save 30k too.
* network/netdev: introduce .iftype to netdev vtableYu Watanabe2021-11-261-0/+4
| | | | And disable .generate_mac flag for non-ether interfaces.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* network: Introduce ipvlan utilSusant Sahani2020-05-171-16/+2
| | | | Move ipvlan common to shared
* network: warn about unknown sections when parsing .netdev filesZbigniew Jędrzejewski-Szmek2019-11-251-2/+2
| | | | | | Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1774242. Now we'll emit the warning about unknown section [Netdev], making the issue much easier to diagnose.
* network: cleanup header inclusionYu Watanabe2019-10-301-1/+1
|
* network: add NetDevVTable::generate_mac flagYu Watanabe2019-05-281-0/+2
|
* network: disable IPv4LL for ipvlan with L3 or L3S modeYu Watanabe2019-05-221-0/+16
| | | | As L3 or L3S mode do not support ARP.
* networkd: introduce netdev ipvtapSusant Sahani2019-05-161-2/+16
| | | | | | | 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.
* tree-wide: drop copyright headers from frequent contributorsZbigniew Jędrzejewski-Szmek2018-06-201-3/+0
| | | | | | | | 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
* tree-wide: beautify remaining copyright statementsLennart Poettering2018-06-141-1/+1
| | | | | | 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.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | 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.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | 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.
* ipvlan: fix wrong assignment in ipvlan_init()Yu Watanabe2018-01-161-1/+1
|
* networkd: Add support for ipvlan L3s and flags (#7726)Susant Sahani2017-12-231-0/+17
| | | | This works supports to configure L3S mode and flags such as bridge, private and vepa
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
| | | | | This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
* networkd: netdev - move to separate subdirectoryTom Gundersen2016-11-131-0/+73
This could (and should) be made into a separate daemon, at least move the sourcefiles out for now.