| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a reconfiguration of an interface is triggered, previously we
call link_foreignize_config(), which sets all static configurations as
foreign, then later call link_drop_foreign_config(), which drops
unnecessary foreign configurations.
This commit merges these two steps into one, link_drop_unmanaged_config(),
which drops unnecessary static and foreign configurations.
Also, this renames link_drop_managed_configs() to
link_drop_static_config(), as it only drops static configurations.
Note that dynamically aquired configurations are dropped by
link_stop_engines().
|
|
|
|
|
|
|
| |
Also, this makes the settings parsed independently, and the
inconsistency will be checked in the section verifier.
No functional change, just refactoring.
|
|
|
|
|
| |
To make them consistent to the netlink message header.
No functional change, just refactoring.
|
|
|
|
|
|
|
| |
Then, we can drop allocation of RoutingPolicyRule object in each conf
parsers.
No functional change, just refactoring.
|
|
|
|
|
|
|
|
| |
[RoutingPolicyRule] sectin
This introduce config_parse_routing_policy_rule(), which wraps existing
conf parsers. With this, we can drop many custom conf parsers for
[RoutingPolicyRule], and can reuse generic conf parsers in conf-parser.[ch].
|
|
|
|
|
| |
Both conf parsers takes an integer. Only difference is the maximum
value. Let's merge them, and pass the maximum value through ltype.
|
| |
|
|
|
|
|
|
| |
This also adds GoTo= to specify the target priority of goto rule.
Note, table was the default but could not be specified in Type=.
|
|
|
|
|
|
| |
Currently, these attributes are not configured by us, but there may be a
existing rule created by user manually with one of these attribute.
To correctly manage such foreign rules, let's read these attributes.
|
|
|
|
|
|
| |
RoutingPolicyRule
No functional change, just refactoring and preparation for later change.
|
|
|
|
|
|
|
| |
Currently, only FIB_RULE_INVERT flag can be configurable, but for
simplicity and future extension, let's manage all flags.
No functional change, just refactoring.
|
|
|
|
|
|
|
|
| |
The kernel parses FRA_SUPPRESS_PREFIXLEN as uint32_t, but internally
handled as signed integer and negative values as unset. Let's explicitly
specify the size of the variable.
No functional change, just refactoring.
|
|
|
|
|
|
| |
comments
No functional change, just refactoring.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As networkd does not configure nexthops, neighbors, or routing policy rules
dynamically, this only changes link_drop_managed_addresses(). Previously
it also removed dynamic addresses, but with this commit, now it only
removes static addresses. Note, link_drop_managed_routes() has removed
only static routes, so this commit only changes its name.
Note. as commented in the code, the dynamic addresses will be removed
on lease expiration or stopping client, and link_drop_managed_xyz() are
called on reconfiguration or so, and at that time, all dynamic
addressing clients are stopped or restarted, so this should not
effective behavior change.
|
| |
|
|
|
|
|
|
|
|
| |
This makes Request object takes hash, compare, free, and process functions.
With this change, the logic in networkd-queue.c can be mostly
independent of the type of the request or the object (e.g. Address) assigned
to the request, and it becomes simpler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
corresponding object
This also renames e.g. request_process_address() -> address_process_request().
Also, this drops type checks such as `assert(req->type == REQUEST_TYPE_ADDRESS)`,
as in the later commits, the function of processing request, e.g.
`address_process_request()`, will be assigned to the Request object when
it is created. And the request type will be used to distinguish and to
avoid deduplicating requests which do not have any assigned objects,
like REQUEST_TYPE_DHCP4_CLIENT. Hence, the type checks in process functions
are mostly not necessary and redundant.
This is mostly cleanups and preparation for later commits, and should
not change any behavior.
|
|
|
|
|
|
| |
Otherwise, if the carrir of the non-managed interface is lost, the
configs such as addresses or routes on the interface will be removed by
networkd.
|
|
|
|
| |
And move it and relevant functions to conf-parser.[ch].
|
| |
|
|
|
|
|
| |
This adds SuppressInterfaceGroup= option in the [RoutingPolicyRule] section
which has the same semantics as suppress_ifgroup in `ip rule` command.
|
|
|
|
|
|
|
| |
When a .network file is updated but its change is not so big, it is not
necessary to first drop all configs and then reassign later again.
This slightly optimize such situation. First foreignize all configs, and
then drop later when it is not requested by the updated .network file.
|
| |
|
|
|
|
|
|
|
|
| |
This also changes the logic when Priority= is not specified.
Previously, we request without FRA_PRIORITY attribute and kernel picks
the highest unused priority for the rule.
This makes networkd picks the highest unused priority and always request
FRA_PRIORITY attribute.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, when Priority= is unspecified, networkd configured the rule with
the highest (=0) priority. This commit makes networkd distinguish the case
the setting is unspecified and one explicitly specified as Priority=0.
Note.
1) If the priority is unspecified on configure, then kernel dynamically picks
a priority for the rule.
2) The new behavior is consistent with 'ip rule' command.
Replaces #15606.
|
| |
|
| |
|
|
|
|
|
|
| |
We already handle foreign routing policy rules correctly by the previous
commit. So, the serialization/deserialization of rules are not necessary
anymore.
|
|
|
|
|
|
|
|
|
|
|
|
| |
networkd already drop foreign address, routes, and nexthops on startup,
except those created by kernel. However, previously, routing policy
rules were not. The logic of serialization/deserialization of rules only
works for rules created by previous invocation of networkd, and does not
work for one created by other tools like `ip rule`.
This makes networkd drop foreign routing policy rules except created by
kernel on startup. Also, remove rules created by networkd when the
corresponding links are dropped or networkd is stopping.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
As 'verify' implies a boolean result.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
[RoutingPolicyRule] sections are managed by both LIST and Hashmap.
Let's drop list.
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Closes #14724.
|
|
|
|
| |
Closes #14666.
|
|
|
|
| |
Closes #13233.
|
| |
|
|
|
|
|
| |
This also makes routing_policy_rule_get() or friends take
a RoutingPolicyRule object as an input.
|
| |
|