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
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
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
Lennart Poettering
bf61b05a06
networkd: slightly rework route establishment logic
...
Use a for() loop to merge the two very similar loops into one, and add
more comments explaining the logic behing this.
Follow-up for 0d34228fc0
2018-11-29 13:38:54 +09:00
Yu Watanabe
fab57f7f13
Merge pull request #10948 from ssahani/iprule-port-proto
...
networkd: add support to configure ip rule port range and protocol.
2018-11-29 03:17:36 +09:00
Susant Sahani
926062f083
networkd: add support to configure ip rule port range and protocol.
...
Please see:
iprule: support for ip_proto, sport and dport match options
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=f686f764682745daf6a93b0a6330ba42a961f858
Closes 10622
2018-11-28 20:06:28 +05:30
Susant Sahani
0d34228fc0
fix: systemd-networkd reverse route ordering
...
We missing a default route. Add gateway first.
This fixes https://github.com/systemd/systemd/issues/5430
2018-11-28 23:19:00 +09:00
Evgeny Vereshchagin
95ccf1aa5f
tests: suppress "unwanted log lines" in several fuzzers
...
According to https://oss-fuzz.com/fuzzer-stats/by-fuzzer/fuzzer/libFuzzer/job/libfuzzer_asan_systemd ,
fuzz-network-parser, fuzz-netdev-parser and fuzz-journal-remote produce
a lot of unwanted log lines. Let's set the maximum log level to LOG_CRIT
as we do in the other fuzzers.
2018-11-28 10:10:09 +09:00
Thomas Haller
3476951cbb
network: use sd_dhcp_route_get_option() accessor in link_set_dhcp_routes()
2018-11-27 12:20:51 +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
6ce611e57c
network: also load foo.netdev.d/*.conf
...
Fixes #9940 .
2018-11-26 14:28:44 +09:00
Zbigniew Jędrzejewski-Szmek
294bf0c34a
Split out pretty-print.c and move pager.c and main-func.h to shared/
...
This is high-level functionality, and fits better in shared/ (which is for
our executables), than in basic/ (which is also for libraries).
2018-11-20 18:40:02 +01:00
Zbigniew Jędrzejewski-Szmek
4e2ca44233
networkctl: define main through macro
2018-11-20 16:48:21 +01:00
Lennart Poettering
6bf3c61c57
log: introduce new helper call log_setup_service()
...
Let's reduce the common boilerplate and have a single setup function
used by all service code to setup logging.
2018-11-20 11:18:22 +01:00
Zbigniew Jędrzejewski-Szmek
cd5a29ce98
Merge pull request #10742 from poettering/c-utf8
...
default to C.UTF-8 locale, and many improvements to env var file parsing/kernel cmdline parsing
2018-11-15 12:47:17 +01:00
Lennart Poettering
042cad5737
Merge pull request #10753 from keszybz/pager-no-interrupt
...
Add mode in journalctl where ^C is handled by the pager
2018-11-14 20:09:39 +01:00
Lennart Poettering
13df9c398d
fileio: automatically add NULL sentinel to parse_env_file()
...
Let's modernize things a bit.
2018-11-14 17:01:55 +01:00
Lennart Poettering
aa8fbc74e3
fileio: drop "newline" parameter for env file parsers
...
Now that we don't (mis-)use the env file parser to parse kernel command
lines there's no need anymore to override the used newline character
set. Let's hence drop the argument and just "\n\r" always. This nicely
simplifies our code.
2018-11-14 17:01:54 +01:00
Zbigniew Jędrzejewski-Szmek
0221d68a13
basic/pager: convert the pager options to a flags argument
...
Pretty much everything uses just the first argument, and this doesn't make this
common pattern more complicated, but makes it simpler to pass multiple options.
2018-11-14 16:25:11 +01:00
Lennart Poettering
192602cb1e
Merge pull request #10734 from yuwata/network-use-structured-initializers
...
network: several cleanups
2018-11-12 11:42:02 +01:00
Lennart Poettering
bdc0bcf014
Merge pull request #10731 from yuwata/fix-oss-fuzz-11344
...
Fixes oss-fuzz#11344
2018-11-12 10:23:23 +01:00
Yu Watanabe
538f15cf06
tree-wide: use CONFIG_PARSER_PROTOTYPE() macro
2018-11-12 16:45:04 +09:00
Yu Watanabe
3b00878ef6
wait-online: use hashmap_free_with_destructor()
2018-11-12 16:32:11 +09:00
Yu Watanabe
f61365e516
network: use hashmap_steal_first() rather than hashmap_first()+hashmap_remove()
2018-11-12 16:32:11 +09:00
Yu Watanabe
c6dbb5c43f
network: use hashmap_clear_with_destructor() at one more place
2018-11-12 16:32:11 +09:00
Yu Watanabe
3e5700428e
network: allocate hashmap objects when they are required
2018-11-12 16:32:11 +09:00
Yu Watanabe
a0e8e4cf3f
network: do not assign unused value
2018-11-12 16:32:11 +09:00
Yu Watanabe
0f7f27694e
network: fixes related to NetworkConfigSection
...
- Do not allocate NetworkConfigSection when filename == NULL
- set .network element before calling hashmap_put()
- Always free NetworkConfigSection in each object.
2018-11-12 16:32:11 +09:00
Yu Watanabe
17f9c355d5
network: use structured initializers
2018-11-12 16:32:10 +09:00
Yu Watanabe
1a75764a32
network: use NetworkConfigSection in fdb entries
2018-11-12 16:32:10 +09:00
Yu Watanabe
d5017c8410
network: make ndisc related handlers return negative errno but caller ignore the errors
2018-11-12 16:32:10 +09:00
Yu Watanabe
bf877a54c7
Merge pull request #10669 from danderson/networkd-6rd
...
networkd: add 6rd support for sit netdevs
2018-11-12 15:55:03 +09:00
Yu Watanabe
3c7911e810
network: use IN_ADDR_NULL
2018-11-12 00:48:30 +09:00
Lennart Poettering
f57dfcba08
Merge pull request #10722 from yuwata/sd-device-monitor-change-arguments
...
sd-device-monitor: slightly re-design API arguments
2018-11-11 15:43:45 +01:00
Yu Watanabe
fa6f1e54e3
network: use hashmap_free_with_destructor() in network_free()
2018-11-11 11:36:16 +09:00
Yu Watanabe
cdd7812b12
network: fix missing free() in network_free()
...
Fixes oss-fuzz#11345.
2018-11-11 11:21:31 +09:00
Yu Watanabe
deb2b7348e
sd-device: drop priority and description from sd_device_monitor_attach_event() and sd_device_monitor_start()
...
Now we have sd_device_monitor_get_event_soruce(). So, it is not
necessary to include these parameters in the functions for sd_device_monitor.
2018-11-10 22:53:00 +09:00
Yu Watanabe
30dce346d8
network: add missing verification for ip6gretap and sit
...
Fixes oss-fuzz#11324.
2018-11-10 15:53:18 +09:00
David Anderson
d067cab35c
networkd: support 6rd tunnel netdev setup.
2018-11-09 17:56:33 -08:00
Yu Watanabe
e512c6c1aa
network: fix potential segfault in network_free()
2018-11-09 11:45:12 +09:00
Yu Watanabe
d493d82647
network: fix offset for IPv6MTUByte=
...
Fixes oss-fuzz#11302 and oss-fuzz#11314.
2018-11-09 11:44:51 +09:00
Yu Watanabe
28c3428df0
network: adds missing strv_free()
...
Fixes oss-fuzz#11285.
2018-11-08 12:30:03 +09:00