Yu Watanabe
d9940a3f8a
network: introduce network_verify_routes()
2020-10-07 02:44:42 +09:00
Yu Watanabe
565194127a
network: introduce link_serialize_routes()
2020-10-07 02:44:42 +09:00
Yu Watanabe
731ff05b32
network: introduce link_deserialize_routes()
2020-10-07 02:44:42 +09:00
Yu Watanabe
62f0ea5fae
network: introduce link_drop_routes()
2020-10-07 02:44:42 +09:00
Yu Watanabe
779804dd60
network: introduce link_drop_foreign_routes()
2020-10-07 02:44:42 +09:00
Yu Watanabe
169948e9d2
network: make route_free() return NULL
2020-10-07 02:44:42 +09:00
Yu Watanabe
4468f01b67
network: move manager_rtnl_process_route()
2020-10-07 02:44:42 +09:00
Yu Watanabe
141318f777
network: move link_request_set_routes()
2020-10-07 02:44:42 +09:00
Yu Watanabe
fef160b5ab
network: limit InitialCongestionWindow= and InitialAdvertisedReceiveWindow= value
...
Strivtly speaking, this breaks backward compatibility. But setting
too large value into them, then their networking easily breaks.
Note that typically 100 for them is event too large. So, ommiting the
values equal or higher than 1024, and dropping support of k, M, and G
suffixes is OK for normal appropriate use cases.
See discussion in #16643 .
2020-09-29 13:55:17 +09:00
Zbigniew Jędrzejewski-Szmek
90e74a66e6
tree-wide: define iterator inside of the macro
2020-09-08 12:14:05 +02:00
Yu Watanabe
50550722e3
network: fix NDisc handling for the case when multiple routers exist
...
69203fba70
does not consider the case that
multiple routers exist, and causes #16719 .
Fixes #16719 .
2020-09-08 02:30:04 +09:00
Yu Watanabe
501b09dbf2
network: expose route_{hash,compare}_func()
2020-09-08 02:30:04 +09:00
Yu Watanabe
1633c45731
network: dhcp6: drop addresses and delegated prefixes on client stop
...
Previously, we did not drop addresses and delegated prefixes when
DHCP6 client is stopped.
Fixes #15455 .
Fixes #13564 .
2020-07-29 02:05:05 +09:00
Yu Watanabe
69203fba70
network: ndisc: remove old addresses and routes after at least one SLAAC address becomes ready
...
Otherwise, the old addresses will exist in deperecated state.
2020-07-29 02:05:05 +09:00
Yu Watanabe
6e537f62d7
network: dhcp4: release old lease after the new address become ready
...
Previously, on DHCPv4 address renewal, the old address may be removed
while the new address is not ready yet.
This also simplifies the logic of removing address and routes.
2020-07-29 02:05:05 +09:00
Yu Watanabe
80b0e86084
network: make address/route_configure optionally return created Address/Route object
2020-07-29 02:05:05 +09:00
Yu Watanabe
d96edb2c6e
network: downgrade log level in conf parsers
2020-07-17 00:40:09 +09:00
Zbigniew Jędrzejewski-Szmek
de7fef4b6e
tree-wide: use set_ensure_put()
...
Patch contains a coccinelle script, but it only works in some cases. Many
parts were converted by hand.
Note: I did not fix errors in return value handing. This will be done separate
to keep the patch comprehensible. No functional change is intended in this
patch.
2020-06-22 16:32:37 +02:00
Yu Watanabe
c0d48bc50f
network: use VRF's route table if VRF= is set
...
Fixes #14940 .
2020-02-26 15:50:28 +09:00
Zbigniew Jędrzejewski-Szmek
427928caa4
network: change "Gateway=dhcp" to "Gateway=_dhcp" ( #14774 )
...
This way we avoid confusion with a DNS name. Fixes #14773 .
2020-02-05 13:41:30 +09:00
Zbigniew Jędrzejewski-Szmek
d308bb99d2
Resolve alternative ifnames wherever we would resolve an interface name
...
To keep the names manageable, "ifname_or_ifindex" is replaced by "interface".
2020-01-12 11:24:35 +01:00
Zbigniew Jędrzejewski-Szmek
597da51bae
tree-wide: make parse_ifindex simply return the index
...
We don't need a seperate output parameter that is of type int. glibc() says
that the type is "unsigned", but the kernel thinks it's "int". And the
"alternative names" interface also uses ints. So let's standarize on ints,
since it's clearly not realisitic to have interface numbers in the upper half
of unsigned int range.
2020-01-11 12:06:08 +01:00
Zbigniew Jędrzejewski-Szmek
629548c405
Merge pull request #14488 from yuwata/networkctl-show-logs
...
networkctl: status command also shows logs of networkd
2020-01-08 10:49:39 +01:00
Yu Watanabe
98b0299479
network: append INTERFACE= attributes for logs corresponds to a netif
2020-01-07 22:20:43 +09:00
Yu Watanabe
1985c54ff3
network: static routes via DHCP gateway
...
This makes Gateway= also take "DHCP". If "DHCP" is set, then the gateway
address provided by DHCP or IPv6 RA is used.
Closes #8213 .
2020-01-07 19:10:54 +09:00
Yu Watanabe
6ff5cc6b7a
network: introduce multipath route
...
Closes #12541 .
2019-12-18 22:12:57 +09:00
Yu Watanabe
5ecb131d94
network: include NLMSGERR_ATTR_MSG attribute in error message
2019-11-30 16:14:02 +09:00
Yu Watanabe
f5c3892266
network: also assume Table=local for ipv6 route if Type=local, broadcast, anycast or nat ( #14148 )
...
Also, if Type=multicast and scope is not set, then assume Scope=link.
Fixes #14122 .
2019-11-26 12:41:54 +09:00
Zbigniew Jędrzejewski-Szmek
67e05dd8cd
networkd: use same order in _hash_func() and _compare_func()
...
This makes it easier to see that the same data is handled in both cases.
No functional change.
2019-09-17 19:11:50 +02:00
Yu Watanabe
fa3e401a79
network: also take Route::initcwnd and ::initrwnd into hash func
...
Fixes #13506 .
2019-09-17 21:53:42 +09:00
Yu Watanabe
c077a205e7
network: take more route information into hash func
2019-09-17 21:53:42 +09:00
Yu Watanabe
f136875549
network: make route_get() or friends take Route object
2019-09-17 21:53:42 +09:00
Yu Watanabe
c697db75de
network: set scope and protocol for default route
2019-09-15 22:33:11 +09:00
Yu Watanabe
750f919112
network: drop redundant and invalid destination address
...
When dst_prefixlen is not set, the value is not used.
2019-09-15 22:33:11 +09:00
Yu Watanabe
70dc23624e
network: do not use implicit cast to boolean
2019-09-15 22:33:11 +09:00
Zbigniew Jędrzejewski-Szmek
57ad760746
network: drop all checks of ipv6_disabled sysctl
...
*We* control the sysctl setting. If the user configured IPv6, then we apply the
settings, and just make sure that at some point during the configuration the
sysctl is disabled (i.e. ipv6 enabled) if we have IPv6 configured.
Replaces #13283 .
2019-08-27 15:31:48 +02:00
Yu Watanabe
75a302b561
network: fix potential memleaks related to set_put()
2019-08-11 08:57:01 +09:00
William A. Kennington III
0b1cd3e25a
networkd: Routes should take the gateway into account
...
Otherwise, changing the default gateway doesn't purge old gateway routes
left on the system during daemon restart. This also fixes removing other
foreign gateway routes that don't match the expected configuration.
Tested:
Changed gateway addresses prior to the patch and they lingered on
the system during each reconfiguration. Applied this patch and
reconfigured gateways and other routes multiple times and it removed
the foreign routes that had gateways that didn't match.
Signed-off-by: William A. Kennington III <william@wkennington.com>
2019-08-07 20:32:36 +09:00
Yu Watanabe
01aaa3df16
network: introduce route_full_hash_ops
...
Will be used later.
2019-07-19 01:44:44 +09:00
Yu Watanabe
ca420b6201
network: show known route protocol name nicely in debugging logs
2019-07-15 02:05:40 +09:00
Yu Watanabe
d3e291fd62
network: also show route protocol in debugging logs
2019-07-12 09:39:43 +09:00
Yu Watanabe
1b64651bd1
network: use string table for route protocol
2019-07-12 09:39:43 +09:00
Yu Watanabe
41b90a1eb5
network: use string table to parse route table or scope
2019-07-12 09:39:43 +09:00
Yu Watanabe
b297e0a7b0
network: show route scope, table, and type in debugging logs
2019-07-12 09:39:43 +09:00
Yu Watanabe
94d6e29963
network: make Route.Type= support local, broadcast, anycast, multicast, nat, and xresolve
...
Closes #12975 .
2019-07-12 09:39:43 +09:00
Yu Watanabe
7a22312d68
network: use string table to parse route type
2019-07-12 09:39:43 +09:00
Yu Watanabe
ca5ad760a5
network: move conf parsers and function prototypes
2019-06-30 04:45:56 +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
c442331750
network: ignore requested ipv6 route when ipv6 is disabled by sysctl
2019-06-12 11:03:08 +09:00
Susant Sahani
9b88f20aba
networkd: route add MPLS TTL propagate
2019-05-18 10:30:41 +09:00