| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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].
|
| |
|
|
|
|
|
|
|
| |
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 Id= is not specified.
Previously, kernel picks the lowest unused ID, but now networkd picks
the lowest unused ID.
|
| |
|
|
|
|
| |
nexthop
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why is this necessary? Several examples below.
- When a route sets prefsrc, then the address must be already assigned
(see issue #19285), and also it must be ready if IPv6.
- When a route or nexthop sets gateway, then the address must be reachable.
- When a route sets nexthop ID, then the corresponding nexthop must be
assigned.
- When a route sets multipath routes on another interface, then the
interface must exist and be ready to configure.
- When configuring address, the same address must not be under removing
(see issue #18108).
Etc,. etc,...
So, this makes all requests about addresses, routes, and nethops are once
stored in the queue, and will be processed when they are ready to configure.
Fixes #18108 and #19285.
|
|
|
|
|
| |
Similar to addresses or routes, this makes networkd drops unnecessary
nexthops on configuring links or when a link is dropped.
|
|
|
|
| |
Preparation of later commits.
|
|
|
|
|
| |
As similar to unreachable type routes, blackhole nexthops do not have
NHA_OID attribute, so they are managed by Manager.
|
| |
|
| |
|
|
|
|
|
| |
This is a preparation for later commits. When RTA_NH_ID is set to a
route, then the corresponding nexthop must be exist.
|
|
|
|
| |
This is an alias of `Gateway=0.0.0.0` or `Gateway=::`.
|
| |
|
|
|
|
| |
As 'verify' implies a boolean result.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
[NextHop] sections are managed by both LIST and Hashmap.
Let's drop list, as they store the completely same information.
|
| |
|
| |
|
| |
|
| |
|
|
Used to manipulate entries in the kernel's nexthop tables.
Example:
```
[NextHop]
Id=3
Gateway=192.168.5.1
```
|