summaryrefslogtreecommitdiff
path: root/src/network/networkd-nexthop.h
Commit message (Collapse)AuthorAgeFilesLines
* network: re-design request queueYu Watanabe2022-03-111-5/+0
| | | | | | | | 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.
* network: make request_process_address() and friends take Link and ↵Yu Watanabe2022-03-111-1/+1
| | | | | | | | | | | | | | | | | 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.
* network: remove only managed configs on reconfigure or carrier lostYu Watanabe2022-02-011-1/+1
| | | | | | 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.
* network: rename NetworkConfigSection -> ConfigSectionYu Watanabe2022-01-191-1/+1
| | | | And move it and relevant functions to conf-parser.[ch].
* network: manage route and nexthop flagsYu Watanabe2021-11-131-1/+2
|
* network: delay dropping addresses or so on reloading .network filesYu Watanabe2021-10-261-0/+1
| | | | | | | 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.
* network: use NetworkConfigSource/State to manage nexthopsYu Watanabe2021-09-151-2/+5
| | | | | | 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.
* network: expose hash and compare functionsYu Watanabe2021-06-081-0/+3
|
* network: nexthop: add Group= setting to configure multipath route with group ↵Yu Watanabe2021-05-221-0/+3
| | | | nexthop
* network: use request queue to configure addresses, routes, and nexthopsYu Watanabe2021-05-121-1/+4
| | | | | | | | | | | | | | | | | | | | 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.
* network: nexthop: drop unnecessary nexthopsYu Watanabe2021-02-231-0/+2
| | | | | Similar to addresses or routes, this makes networkd drops unnecessary nexthops on configuring links or when a link is dropped.
* network: nexthop: read protocol in received netlink messageYu Watanabe2021-02-231-1/+1
| | | | Preparation of later commits.
* network: nexthop: add Blackhole= setting in [NextHop] sectionYu Watanabe2021-02-231-0/+3
| | | | | As similar to unreachable type routes, blackhole nexthops do not have NHA_OID attribute, so they are managed by Manager.
* network: nexthop: add OnLink= settingYu Watanabe2021-02-211-0/+2
|
* network: add NextHop= setting in [Route] sectionYu Watanabe2021-02-191-0/+1
|
* network: configure nexthop before routes that requires gatewayYu Watanabe2021-02-191-1/+1
| | | | | This is a preparation for later commits. When RTA_NH_ID is set to a route, then the corresponding nexthop must be exist.
* network: nexthop: introduce Family= setting in [NextHop] sectionYu Watanabe2021-02-171-0/+1
| | | | This is an alias of `Gateway=0.0.0.0` or `Gateway=::`.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* network: rename network_verify_xxx() -> network_drop_invalid_xxx()Yu Watanabe2020-10-071-1/+1
| | | | As 'verify' implies a boolean result.
* network: introduce network_verify_nexthops()Yu Watanabe2020-10-071-1/+2
|
* network: drop NextHop::oif and always use link ifindexYu Watanabe2020-10-071-3/+1
|
* network: cleanup headers included in networkd-nexthop.hYu Watanabe2020-10-071-10/+12
|
* network: drop list of static nexthopsYu Watanabe2020-10-071-2/+0
| | | | | [NextHop] sections are managed by both LIST and Hashmap. Let's drop list, as they store the completely same information.
* network: drop unused nexthop_remove() and nexthop_equal()Yu Watanabe2020-10-071-3/+0
|
* network: make several functions staticYu Watanabe2020-10-071-8/+0
|
* network: move manager_rtnl_process_nexthop() to networkd-nexthop.cYu Watanabe2020-10-071-0/+2
|
* network: move link_request_set_nexthop() to networkd-nexthop.cYu Watanabe2020-10-071-1/+2
|
* network: introduce ip nexthop routingSusant Sahani2019-10-141-0/+50
Used to manipulate entries in the kernel's nexthop tables. Example: ``` [NextHop] Id=3 Gateway=192.168.5.1 ```