| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implement serialization/deserialization for DNR servers. This re-uses
the string format in place for user configuration of DoT servers, and as
a consequence non-DoT servers are discarded when recording the link
configuration, for correctness.
This also enables sd-resolved to use these servers as it would other DNS
servers.
|
| |
| |
| |
| |
| | |
For now only DoT is supported, so DoT resolvers are represented using
the existing configuration format.
|
| |
| |
| |
| |
| |
| | |
This option will control the use of DNR for choosing DNS servers on the
link. Defaults to the value of UseDNS so that in most cases they will be
toggled together.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Limits should be enforced, but not in a way real setups collide with
them.
There have been multiple reports that current limits are too low, hence
raise them 8x.
Fixes: #24852
|
| |
| |
| |
| | |
Make some code a bit shorter.
|
| |
| |
| |
| | |
DHCPv6PrefixDelegation= is replaced with DHCPPrefixDelegation=.
|
| |
| |
| |
| | |
Fixes #34299.
|
| |
| |
| |
| |
| | |
Follow-up for f963f8953daeab03b892616ce0c65f7572932187 and
1536b7b2d00819615bf8eba194de7ccd20c3689f.
|
|\ \
| | |
| | | |
network: wait for IPv6 MTU being synced to link MTU
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The kernel resets the IPv6 MTU of an interface when its link MTU is changed.
But it seems the operation is asynchronous, and even when we detect that
the link MTU is changed, the IPv6 MTU may not be reset yet.
====
[ 2257.067613] systemd-networkd[447122]: veth99: MTU is changed: 1500 →1600 (min: 68, max: 65535)
[ 2257.067641] systemd-networkd[447122]: Setting '/proc/sys/net/ipv6/conf/veth99/mtu' to '1410'
[ 2257.067711] systemd-networkd[447122]: No change in value '1410', suppressing write
====
As you can see, even if the link MTU is changed to 1600, the IPv6 MTU is
unchanged (in this case, still 1410).
|
| | |
| | |
| | |
| | | |
No functional change, just refactoring.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
NDisc options
No effective functional change, just refactoring.
|
| | |
| | |
| | |
| | | |
No functional change, just refactoring.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The family will be checked later in
address_section_verify() -> address_section_adjust_broadcast(),
hence it is not necessary to set here.
Follow-up for 5d15c7b19cae6d3332d4e213c380e0fcc1317a2c.
Fixes oss-fuzz#372994449.
Fixes #34748.
|
|\ \
| | |
| | | |
network: several cleanups for conf parsers
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This introduces a generic [Route] section parser, then embed conf
parsers for route metric into it.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- make it accept an empty string,
- use config_parse_in_addr_prefix(),
- move null address checker to address_section_verify().
No functional change, just refactoring.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, the below was refused and the IPv6 address would not assigned.
===
[Address]
Address=2001:db8:0:f101::15/64
Broadcast=192.168.0.255
===
However, in the following case, networkd warned about the broadcast
address would be ignored, and the IPv6 address would be configured.
===
[Address]
Broadcast=192.168.0.255
Address=2001:db8:0:f101::15/64
===
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also, this makes the settings parsed independently, and the
inconsistency will be checked in the section verifier.
No functional change, just refactoring.
|
| | |
| | |
| | |
| | |
| | | |
The function is also used in other source files. Hence, not internal.
No functional change, just refactoring.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
bpf_current_task_under_cgroup() returns 1 if the task is under the
specified cgroup, 0 if not, negative if an error happens.
Differentiate the 1 and -1 cases, and report to userspace when we got
and error.
An error like this is mostly unlikely, the only common one is that the
userspace doesn't populate the map, and the call returns -EAGAIN.
Tested by mocking the return value of bpf_current_task_under_cgroup():
Enumeration completed
enp1s0f0np0: Configuring with /etc/systemd/network/20-test.network.
Sysctl monitor BPF returned error: Link number out of range
Sysctl monitor BPF returned error: No CSI structure available
Sysctl monitor BPF returned error: Invalid exchange
Sysctl monitor BPF returned error: Exchange full
Sysctl monitor BPF returned error: Invalid request code
Sysctl monitor BPF returned error: Unknown error 58
Sysctl monitor BPF returned error: Device not a stream
Sysctl monitor BPF returned error: Timer expired
Sysctl monitor BPF returned error: Machine is not on the network
Sysctl monitor BPF returned error: Object is remote
Sysctl monitor BPF returned error: Advertise error
|
| |
| |
| |
| |
| | |
To make them consistent to the netlink message header.
No functional change, just refactoring.
|
| |
| |
| |
| |
| |
| |
| | |
- use uint8_t, uint16_t, and so on, rather than unsigned char, unsigned
short, and so on, respectively,
- rename output parameters to ret or ret_xyz,
- add several missing assertions.
|
| |
| |
| |
| |
| |
| |
| | |
interface types
This should fix QMI wwan modems, as noted in
https://github.com/systemd/systemd/issues/27219
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The compiler clones the u32 i variable to another register, and fails to
calculate the range of possible values, so the verification fails.
libbpf: prog 'sysctl_monitor': BPF program load failed: Permission denied
libbpf: prog 'sysctl_monitor': -- BEGIN PROG LOAD LOG --
0: R1=ctx() R10=fp0
; int sysctl_monitor(struct bpf_sysctl *ctx) { @ sysctl-monitor.bpf.c:65
0: (bf) r6 = r1 ; R1=ctx() R6_w=ctx()
; if (bpf_current_task_under_cgroup(&cgroup_map, 0)) @ sysctl-monitor.bpf.c:69
1: (18) r1 = 0xffff892a0fda9c00 ; R1_w=map_ptr(map=cgroup_map,ks=4,vs=4)
3: (b7) r2 = 0 ; R2_w=0
4: (85) call bpf_current_task_under_cgroup#37 ; R0_w=scalar()
5: (55) if r0 != 0x0 goto pc+88 ; R0_w=0
; if (!ctx->write) @ sysctl-monitor.bpf.c:73
6: (61) r1 = *(u32 *)(r6 +0) ; R1_w=scalar(smin=0,smax=umax=0xffffffff,var_off=(0x0; 0xffffffff)) R6_w=ctx()
7: (15) if r1 == 0x0 goto pc+86 ; R1_w=scalar(smin=umin=umin32=1,smax=umax=0xffffffff,var_off=(0x0; 0xffffffff))
8: (b7) r1 = 1 ; R1_w=1
; we.version = 1; @ sysctl-monitor.bpf.c:81
9: (7b) *(u64 *)(r10 -480) = r1 ; R1_w=1 R10=fp0 fp-480_w=1
10: (b7) r8 = 0 ; R8_w=0
; we.path[0] = 0; @ sysctl-monitor.bpf.c:83
11: (73) *(u8 *)(r10 -440) = r8 ; R8_w=0 R10=fp0 fp-440=???????0
; we.newvalue[0] = 0; @ sysctl-monitor.bpf.c:86
12: (73) *(u8 *)(r10 -180) = r8 ; R8_w=0 R10=fp0 fp-184=???0????
; we.current[0] = 0; @ sysctl-monitor.bpf.c:85
13: (73) *(u8 *)(r10 -340) = r8 ; R8_w=0 R10=fp0 fp-344=???0????
; we.comm[0] = 0; @ sysctl-monitor.bpf.c:84
14: (73) *(u8 *)(r10 -456) = r8 ; R8_w=0 R10=fp0 fp-456=???????0
; we.pid = bpf_get_current_pid_tgid() >> 32; @ sysctl-monitor.bpf.c:89
15: (85) call bpf_get_current_pid_tgid#14 ; R0=scalar()
16: (77) r0 >>= 32 ; R0_w=scalar(smin=0,smax=umax=0xffffffff,var_off=(0x0; 0xffffffff))
17: (63) *(u32 *)(r10 -472) = r0 ; R0_w=scalar(id=1,smin=0,smax=umax=0xffffffff,var_off=(0x0; 0xffffffff)) R10=fp0 fp-472=????scalar(id=1,smin=0,smax=umax=0xffffffff,var_off=(0x0; 0xffffffff))
; we.cgroup_id = bpf_get_current_cgroup_id(); @ sysctl-monitor.bpf.c:90
18: (85) call bpf_get_current_cgroup_id#80 ; R0_w=s
libbpf: prog 'sysctl_monitor': failed to load: -13
libbpf: failed to load object 'sysctl_monitor_bpf'
libbpf: failed to load BPF skeleton 'sysctl_monitor_bpf': -13
Unable to load sysctl monitor BPF program, ignoring: Permission denied.
Change the type to u64 to fix it.
|
| | |
|
| | |
|
| |
| |
| |
| | |
No functional change, just refactoring.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before:
$ networkctl status
● Interfaces: 372, 368, 373, 375, 376, 377, 378, 379, 381, 391, 3, 1201, 1202, 1184, 1610, 9, 8, 1340, 2, 1, 1256, 7
After:
$ networkctl status
● Interfaces: 1, 2, 3, 7, 8, 9, 368, 372, 373, 375, 376, 377, 378, 379, 381, 391, 1184, 1201, 1202, 1256, 1340, 1610
|
| | |
|
| | |
|
| |
| |
| |
| | |
each other
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
network: log when no matching .network file found
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When an interface enters unmanaged state, there are two possibilities:
- no matching .network file found,
- found a matching .network with Unmanaged=yes.
When a matching .network file is found, networkd logs the filename.
Let's also log when no matching .network file is found.
This also slightly adjust the log message when a matching .network file
found.
Closes #34436.
|
|/ /
| |
| |
| | |
No functional change, just refactoring.
|
| | |
|
| |
| |
| |
| |
| | |
When eBPF is disabled, the hashmap will be never used. Let's not
allocate it.
|