Lennart Poettering
7ece6f5897
networkd: permit DNS "DefaultRoute" configuration in .network files
2018-12-21 12:10:07 +01:00
Lennart Poettering
09451975df
networkd: small simplification
2018-12-21 12:10:07 +01:00
Lennart Poettering
500c65ad69
Merge pull request #11167 from yuwata/sd-resolve-typesafe
...
sd-resolve: introduce typesafe macros
2018-12-17 19:22:07 +01:00
Yu Watanabe
45cb8247d9
Merge pull request #11142 from ssahani/bond-dynamic-tlb
...
netdev bond: add support to configure tlb_dynamic_lb
2018-12-17 02:06:05 +01:00
Yu Watanabe
1061dab129
netdev: use typesafe resolve_getaddrinfo() in wireguard.c
2018-12-17 10:02:36 +09:00
Yu Watanabe
a4c9ae400f
netdev: sort headers
2018-12-17 10:02:36 +09:00
Susant Sahani
6d4efac2d9
networkd: Bond - AllSlavesActive fix parser
...
Bond.AllSlavesActive use parser type bool
2018-12-15 18:17:02 +05:30
Susant Sahani
fde60a424e
netdev bond: add support to configure tlb_dynamic_lb
...
Closes https://github.com/systemd/systemd/issues/11135
Add test for bond : tlb_dynamic_lb
2018-12-15 18:15:16 +05:30
Lennart Poettering
9a6f746fb6
locale-util: prefix special glyph enum values with SPECIAL_GLYPH_
...
This has been irritating me for quite a while: let's prefix these enum
values with a common prefix, like we do for almost all other enums.
No change in behaviour, just some renaming.
2018-12-14 08:22:54 +01:00
Chris Down
e92aaed30e
tree-wide: Remove O_CLOEXEC from fdopen
...
fdopen doesn't accept "e", it's ignored. Let's not mislead people into
believing that it actually sets O_CLOEXEC.
From `man 3 fdopen`:
> e (since glibc 2.7):
> Open the file with the O_CLOEXEC flag. See open(2) for more information. This flag is ignored for fdopen()
As mentioned by @jlebon in #11131 .
2018-12-12 20:47:40 +01:00
Thomas Haller
8217ed5ec3
network: fix handling of uninitialized and zero IAID setting
...
An earlier commit 0e408b82b (dhcp6-client: handle IAID with value zero)
introduced a flag to sd_dhcp6_client to distinguish between an unset
IAID and a value set to zero.
However, that was not sufficient and broke leaving the setting
uninitialized in networkd configuration. The configuration parsing
also must distinguish between the default, unset value and an
explict zero configuration.
Fixes: 0e408b82b8
2018-12-10 14:25:28 +01:00
Lennart Poettering
ec68d13789
Merge pull request #10897 from keszybz/etc-fstab-parsing
...
Forbid dashes in hostnames and /etc/fstab parsing improvements
2018-12-10 12:31:30 +01:00
Zbigniew Jędrzejewski-Szmek
7470cc4c73
resolve: reject host names with leading or trailing dashes in /etc/hosts
...
https://tools.ietf.org/html/rfc1035#section-2.3.1 says (approximately)
that only letters, numbers, and non-leading non-trailing dashes are allowed
(for entries with A/AAAA records). We set no restrictions.
hosts(5) says:
> Host names may contain only alphanumeric characters, minus signs ("-"), and
> periods ("."). They must begin with an alphabetic character and end with an
> alphanumeric character.
nss-files follows those rules, and will ignore names in /etc/hosts that do not
follow this rule.
Let's follow the documented rules for /etc/hosts. In particular, this makes us
consitent with nss-files, reducing surprises for the user.
I'm pretty sure we should apply stricter filtering to names received over DNS
and LLMNR and MDNS, but it's a bigger project, because the rules differ
depepending on which level the label appears (rules for top-level names are
stricter), and this patch takes the minimalistic approach and only changes
behaviour for /etc/hosts.
Escape syntax is also disallowed in /etc/hosts, even if the resulting character
would be allowed. Other tools that parse /etc/hosts do not support this, and
there is no need to use it because no allowed characters benefit from escaping.
2018-12-10 09:56:56 +01:00
William A. Kennington III
e4a71bf36f
networkd: Static neighbor support
...
When using networkd we currently have no way of ensuring that static
neighbor entries are set when our link comes up. This change adds a new
section to the network definition that allows multiple static neighbors
to be set on a link.
2018-12-09 16:56:37 -08:00
William A. Kennington III
289e6774d0
networkd: Use only a generic CONFIGURING state
...
This allows us to convey that we are performing multiple link
configuration changes in parallel. This is needed to support configuring
neighbors while simultaneously configuring addresses and routes.
2018-12-09 16:56:00 -08:00
William A. Kennington III
c42ff3a1a7
networkd: Track address configuration
...
This will be useful to assert that our static route configuration always
happens after address configuration once our individual configure state
goes away.
2018-12-09 16:54:37 -08:00
Yu Watanabe
c03a80c419
wait-online: define main through macro
2018-12-08 18:09:40 +09:00
Yu Watanabe
2362a8f547
network: define main through macro
2018-12-08 18:09:40 +09:00
Yu Watanabe
f0a43eb821
Merge pull request #11063 from yuwata/update-missing-v3
...
missing: split missing.h into small pieces
2018-12-06 16:54:27 +01:00
Yu Watanabe
801503d22b
Merge pull request #10988 from ssahani/IFLA_BRPORT_MCAST_TO_UCAST
...
networkd: bridge add support to configure multicast_to_unicast
2018-12-06 14:32:52 +01:00
Yu Watanabe
e93672eeac
tree-wide: drop missing.h from headers and use relevant missing_*.h
2018-12-06 13:31:16 +01:00
Yu Watanabe
ef118d00eb
util: drop missing.h from socket-util.h
2018-12-06 13:31:16 +01:00
Susant Sahani
8b220643b1
networkd: RPDB rule - add support to configure inverted rule.
...
Closes #10706
2018-12-06 10:42:36 +05:30
Yu Watanabe
253de60634
Merge pull request #11021 from ssahani/isatap
...
networkd: Add support to configure ISATAP tunnel
2018-12-05 23:13:17 +01:00
Yu Watanabe
36dd5ffd5d
util: drop missing.h from util.h
2018-12-04 10:00:34 +01:00
Susant Sahani
d3aa8b49e5
networkd: bridge add support to configure multicast_to_unicast
...
closes #10649
2018-12-03 23:49:46 +05:30
Lennart Poettering
76b31bbb24
Merge pull request #10920 from yuwata/hashmap-destructor
...
hashmap: make hashmap_free() call destructors of key or value
2018-12-03 17:59:44 +01:00
Lennart Poettering
a20f73221a
Merge pull request #10976 from yuwata/typesafe-netlink-call
...
netlink: introduce typesafe netlink functions
2018-12-03 17:55:00 +01:00
Yu Watanabe
7934dede41
network: drop unnecessary buffers
2018-12-03 12:15:26 +01:00
Lennart Poettering
ad2bf5df89
Merge pull request #10992 from yuwata/follow-up-10948
...
network: make fib rule accept arbitrary ip protocol
2018-12-03 11:09:04 +01:00
Yu Watanabe
9714c020fc
missing: split network related entries
...
Also adds comments which kernel version added the entries.
Closes #10553 .
2018-12-03 10:31:05 +01:00
Susant Sahani
918049ad53
networkd: Add support to configure ISATAP tunnel
...
Let's just reuse the code of sit tunnel to create a ISATAP tunnel.
Matter of turning a flag
Please see https://elixir.bootlin.com/linux/v4.19.6/source/net/ipv6/sit.c#L208
2018-12-03 09:15:24 +05:30
Susant Sahani
7b3b982217
vxlan: minor coding style fixes.
2018-12-03 02:05:12 +09:00
Lennart Poettering
686d13b9f2
util-lib: split out env file parsing code into env-file.c
...
It's quite complex, let's split this out.
No code changes, just some file rearranging.
2018-12-02 13:22:29 +01:00
Lennart Poettering
e4de72876e
util-lib: split out all temporary file related calls into tmpfiles-util.c
...
This splits out a bunch of functions from fileio.c that have to do with
temporary files. Simply to make the header files a bit shorter, and to
group things more nicely.
No code changes, just some rearranging of source files.
2018-12-02 13:22:29 +01:00
Yu Watanabe
7a08d314f2
tree-wide: make hash_ops typesafe
2018-12-02 07:53:27 +01:00
Yu Watanabe
302a796f5a
network: use typesafe netlink_call_async() macro where applicable
2018-12-02 06:29:32 +01:00
Yu Watanabe
10ff4eb621
network: rename ndisc_route_handler() to ndisc_netlink_message_handler()
...
As it is also called when configuring addresses.
2018-12-02 06:28:44 +01:00
Yu Watanabe
bd1175bc46
network: add assertions
...
As they do not have default callback functions.
2018-12-02 06:23:45 +01:00
Yu Watanabe
4645ad47ac
network: use route_remove_handler() as the default callback of route_remove()
2018-12-02 06:23:45 +01:00
Yu Watanabe
63ae056909
network: use address_remove_handler() as the default callback of address_remove()
2018-12-02 06:23:45 +01:00
Yu Watanabe
29889b4d24
network: set default callbacks for routing_policy_rule_configure() and routing_policy_rule_remove()
2018-12-02 06:23:45 +01:00
Yu Watanabe
cccf9517f1
network: move address_label_handler() to networkd-address-label.c
...
And use it as the default callback function of address_label_configure().
2018-12-02 06:23:45 +01:00
Yu Watanabe
a9eea6065c
network: simplify dhcp6_get_prefix_delegation()
2018-12-02 06:23:45 +01:00
Yu Watanabe
3a269dcf51
network: make IPProtocol= also accept IP protocol number
2018-12-02 06:13:47 +01:00
Yu Watanabe
97f9df9e30
network: rename Protocol= in [RoutingPolicyRule] to IPProtocol=
2018-12-02 06:13:47 +01:00
Yu Watanabe
da96ad5ae2
util: rename socket_protocol_{from,to}_name() to ip_protocol_{from,to}_name()
2018-12-02 05:48:27 +01:00
Susant Sahani
58a02e4c97
ip rule: fix clang warning.
...
```
[2/1209] Compiling C object 'src/network/src@network@@networkd-core@sta/networkd-routing-policy-rule.c.o'.
FAILED: src/network/src@network@@networkd-core@sta/networkd-routing-policy-rule.c.o
clang -Isrc/network/src@network@@networkd-core@sta -Isrc/network -I../src/network -Isrc/basic -I../src/basic -Isrc/shared -I../src/shared -Isrc/systemd -I../src/systemd -Isrc/journal -I../src/journal -Isrc/journal-remote -I../src/journal-remote -Isrc/nspawn -I../src/nspawn -Isrc/resolve -I../src/resolve -Isrc/timesync -I../src/timesync -I../src/time-wait-sync -Isrc/login -I../src/login -Isrc/udev -I../src/udev -Isrc/libudev -I../src/libudev -Isrc/core -I../src/core -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-netlink -I../src/libsystemd/sd-network -Isrc/libsystemd-network -I../src/libsystemd-network -I. -I../ -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -std=gnu99 -O0 -g -Wextra -Werror=undef -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wfloat-equal -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Wdate-time -Wnested-externs -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-error=nonnull -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -fPIE -Wno-typedef-redefinition -Wno-gnu-variable-sized-type-not-at-end -Werror=shadow -include config.h -fPIC -MD -MQ 'src/network/src@network@@networkd-core@sta/networkd-routing-policy-rule.c.o' -MF 'src/network/src@network@@networkd-core@sta/networkd-routing-policy-rule.c.o.d' -o 'src/network/src@network@@networkd-core@sta/networkd-routing-policy-rule.c.o' -c ../src/network/networkd-routing-policy-rule.c
../src/network/networkd-routing-policy-rule.c:1071:33: error: format specifies type 'unsigned char' but the argument has type '__u16' (aka 'unsigned short') [-Werror,-Wformat]
rule->sport.start, rule->sport.end);
^~~~~~~~~~~~~~~~~
../src/network/networkd-routing-policy-rule.c:1071:52: error: format specifies type 'unsigned char' but the argument has type '__u16' (aka 'unsigned short') [-Werror,-Wformat]
rule->sport.start, rule->sport.end);
^~~~~~~~~~~~~~~
../src/network/networkd-routing-policy-rule.c:1078:33: error: format specifies type 'unsigned char' but the argument has type '__u16' (aka 'unsigned short') [-Werror,-Wformat]
rule->dport.start, rule->dport.end);
^~~~~~~~~~~~~~~~~
../src/network/networkd-routing-policy-rule.c:1078:52: error: format specifies type 'unsigned char' but the argument has type '__u16' (aka 'unsigned short') [-Werror,-Wformat]
rule->dport.start, rule->dport.end);
^~~~~~~~~~~~~~~
4 errors generated.
```
2018-12-01 15:45:12 +01:00
Lennart Poettering
59ea6e57a5
networkd: refuse IPv6 RADV prefixes that lack Prefix= setting
...
Fixes : #9589
2018-11-30 22:19:28 +01:00
Susant Sahani
173a6e29be
networkd: vxlan make use of parse_ip_port_range
...
Use parse_ip_port_range
2018-11-29 14:04:26 +01:00