Yu Watanabe
35c5a9cae4
network: expose carrier and address states over dbus
...
Previously, when a bridge or bonding interface is in degraded-carrier
state, then we cannot judge the interface has addresses or not.
By using the new states, dbus clients can distinguish such situation.
2019-06-16 23:17:28 +09:00
Yu Watanabe
1678fbb3c5
network: split operational states into carrier and address states
...
This should not change any behavior. The new states will be exposed by
later commits.
2019-06-16 23:17:23 +09:00
Yu Watanabe
6a1af3d4ca
network: split out DBus related prototypes to networkd-link-bus.h
2019-06-16 09:13:12 +09:00
Yu Watanabe
bafa964144
network: read link specific sysctl value
...
This introduce link_sysctl_ipv6_enabled() and replaces
manager_sysctl_ipv6_enabled() with it.
2019-06-15 14:56:42 +02:00
Yu Watanabe
463797c104
network: skip to check dynamic addresses when ConfigureWithoutCarrier=yes
...
Otherwise, the interface cannot be in "configured" state, as ipv6 link local
addressing is enabled by default. Note that even if ConfigureWithoutCarrier=
is set, all dynamic configurations are checked when the interface has
carrier.
2019-06-14 05:25:35 +09:00
Yu Watanabe
7ef7e5509b
network: ignore requested ipv6 routing policy rule when ipv6 is disabled by sysctl
2019-06-12 11:03:37 +09:00
Yu Watanabe
c442331750
network: ignore requested ipv6 route when ipv6 is disabled by sysctl
2019-06-12 11:03:08 +09:00
Yu Watanabe
54a1a535bd
network: ignore requested ipv6 addresses when ipv6 is disabled by sysctl
2019-06-12 11:02:33 +09:00
Yu Watanabe
d03073ddcd
network: assign new DHCP address before removing old lease address
...
Closes #12676 .
2019-06-07 16:22:00 +09:00
Zbigniew Jędrzejewski-Szmek
2db18cdd46
Merge pull request #12738 from yuwata/network-routing-policy-cleanup
...
network: several cleanups for routing policy rule
2019-06-06 18:53:20 +02:00
Yu Watanabe
db51778f85
network: make KeepConfiguration=static drop DHCP addresses and routes
...
Also, KeepConfiguration=dhcp drops static foreign addresses and routes.
2019-06-06 22:50:29 +09:00
Yu Watanabe
95355a281c
network: add KeepConfiguration=dhcp-on-stop
...
The option prevents to drop lease address on stop.
By setting this, we can safely restart networkd.
2019-06-06 22:50:29 +09:00
Susant Sahani
7da377ef16
networkd: add support to keep configuration
2019-06-06 22:50:29 +09:00
Yu Watanabe
9f08a578a8
network: remove unused argument in routing_policy_rule_configure()
2019-06-04 16:23:18 +09:00
Zbigniew Jędrzejewski-Szmek
c2babfc2f5
networkd: rewrite condition to make it easier to understand
2019-05-30 15:31:44 +02:00
Yu Watanabe
d61e4c5b6e
network: add nlmon support
...
nlmon is a Netlink monitor device.
2019-05-28 22:47:15 +09:00
Yu Watanabe
cab042b843
network: make VXCAN devices go through LINK_STATE_CONFIGURING
2019-05-24 10:55:33 +09:00
Yu Watanabe
910feb787f
network: unify link_ipv4ll_enabled() and link_ipv4ll_fallback_enabled()
2019-05-22 17:59:39 +09:00
Yu Watanabe
a0ae96149a
network: drop unused variable
2019-05-22 17:59:39 +09:00
Yu Watanabe
bb262ef02b
network: update master's ifindex in link_update()
...
And use it in link_is_enslaved().
2019-05-22 17:59:39 +09:00
Yu Watanabe
2292a4c6db
network: drop duplicated logs
...
link_set_state() already logs about state change.
2019-05-22 17:58:46 +09:00
Yu Watanabe
af9ba57aa2
network: make CAN devices go through LINK_STATE_CONFIGURING
2019-05-22 17:58:46 +09:00
Yu Watanabe
f410d46358
network: disable IPv4LL for ipvlan with L3 or L3S mode
...
As L3 or L3S mode do not support ARP.
2019-05-22 17:58:46 +09:00
Yu Watanabe
b26ea30801
network: tighten the condition whether link has carrier
...
ip command requires that IFF_RUNNING is set for that the link has
carrier.
2019-05-19 05:39:45 +09:00
Yu Watanabe
a32a00831c
Merge pull request #12574 from yuwata/network-mtu-issue-12552
...
network: do not always bump MTU with additional 4bytes
2019-05-16 08:25:48 +02:00
Yu Watanabe
fe0e16db09
network: do not use ordered_set_printf() for DOMAINS= or ROUTE_DOMAINS=
...
This partially reverts 5e2a51d588
.
Fixes #12531 .
2019-05-16 05:17:26 +02:00
Yu Watanabe
f6fcc1c2a4
network: bump MTU bytes only when MTUByte= is not set
2019-05-16 11:51:03 +09:00
Yu Watanabe
933c70a0a4
network: honor MTUBytes= setting
...
Closes #12552 .
2019-05-16 11:47:41 +09:00
Yu Watanabe
af2fa2c116
network: disable link local addressing on ipip, gre, sit, and vti netdevs
...
Closes #12547 .
2019-05-16 05:53:41 +09:00
Yu Watanabe
710ce9e537
network: link_check_ready() returns earlier if routes are not configured yet
...
link_request_set_routes() calls link_check_ready(), so it is not
necessary to continue that here.
2019-05-16 05:53:41 +09:00
Yu Watanabe
d8f31d7d32
Merge pull request #12537 from yuwata/network-link-local-follow-ups
...
network: do not send ipv6 token to kernel
2019-05-14 02:22:18 +02:00
Yu Watanabe
9f6e82e6eb
network: do not send ipv6 token to kernel
...
We disabled kernel RA support. Then, we should not send
IFLA_INET6_TOKEN.
Thus, we do not need to send IFLA_INET6_ADDR_GEN_MODE twice.
Follow-up for 0e2fdb83bb
and
4eb086a387
.
2019-05-12 07:32:00 +09:00
Yu Watanabe
86e2be7bc3
network: drop unnecessary initializations
2019-05-11 06:24:04 +09:00
Yu Watanabe
4799f19e30
network: move link_set_bond() to netdev/bond.c
2019-05-11 06:24:04 +09:00
Yu Watanabe
9a81f11956
network: move link_set_bridge to netdev/bridge.c
2019-05-11 06:24:04 +09:00
Yu Watanabe
3ddcbeea45
network: move CAN link related functions to networkd-can.c
2019-05-11 06:24:00 +09:00
Yu Watanabe
06d7cee589
network: make BindCarrier= work with CAN devices
...
If CAN device is set `BindCarrier=` then the interface could not be
down. This fixes the issue.
2019-05-11 06:21:43 +09:00
Yu Watanabe
8e54db83e2
network: make link_drop() can take custom handler
...
It will be used in the later commit.
2019-05-11 06:15:35 +09:00
Yu Watanabe
7f8539504c
network: move sd_lldp related functions to networkd-lldp-rx.c
2019-05-11 06:14:39 +09:00
Susant Sahani
be7468f07a
LLDP: Fix logs for LLDP
...
```
May 10 11:08:54 test systemd-networkd[447]: wwan0: Failed to stop LLDP: Success
May 10 11:08:54 test systemd-networkd[447]: wwan0: Gained carrier
May 10 11:08:54 test systemd-networkd[447]: wwan0: Failed to start LLDP: Success
```
2019-05-11 06:14:39 +09:00
Yu Watanabe
0b20047244
network: move link_lldp_emit_enabled() to networkd-lldp-tx.c
2019-05-11 06:14:39 +09:00
Yu Watanabe
5af7bc6f4c
Merge pull request #12480 from ssahani/proxy-arp
...
network: bridge add support to configure proxy ARP/WIFI
2019-05-10 15:30:41 +02:00
Susant Sahani
8185ca6c0a
networkd: Log error if LLDP fails to start/stop
...
Now LLDP does not log anything why it failed which
is hard to debug. Let's just add some logs.
https://github.com/systemd/systemd/issues/10881
2019-05-10 00:01:01 +02:00
Susant Sahani
0fadb2a46f
network: add support to configure proxy ARP/WIFI
2019-05-09 15:03:04 +09:00
Susant Sahani
4eb086a387
networkd: fix link_up() ( #12505 )
...
Fillup IFLA_INET6_ADDR_GEN_MODE while we do link_up.
Fixes the following error:
```
dummy-test: Could not bring up interface: Invalid argument
```
After reading the kernel code when we do a link up
```
net/core/rtnetlink.c
IFLA_AF_SPEC
af_ops->set_link_af(dev, af);
inet6_set_link_af
if (tb[IFLA_INET6_ADDR_GEN_MODE])
Here it looks for IFLA_INET6_ADDR_GEN_MODE
```
Since link up we didn't filling up that it's failing.
Closes #12504 .
2019-05-09 04:05:35 +02:00
Yu Watanabe
9aa5d8ba84
network: include glibc headers before including kernel headers
2019-05-09 03:21:31 +02:00
Yu Watanabe
004aadcacd
network: replace inet_pton() with in_addr_from_string()
2019-05-09 01:44:31 +02:00
Susant Sahani
1087623bac
networkd: Add support to configure proxy ARP and proxy ARP Wifi
2019-05-09 01:44:26 +02:00
Lennart Poettering
b2adc2ae3a
Merge pull request #12501 from keszybz/silence-strncpy-warnings
...
Silence strncpy warnings
2019-05-08 01:39:32 +02:00
Yu Watanabe
2c448c8a17
network: fix use-after-free
...
The function sd_radv_add_prefix() in dhcp6_pd_prefix_assign() may
return -EEXIST, and in that case the sd_radv_prefix object allocated
in dhcp6_pd_prefix_assign() will be freed when the function returns.
Hence, the key value in Manager::dhcp6_prefixes hashmap is lost.
2019-05-07 16:55:19 +02:00