summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-neighbor.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* network/neighbor: follow the way how kernel distinguish neighbor settingsYu Watanabe2023-07-301-1/+1
| | | | | | The kernel manages neighbors by the destination address, and the LinkLayerAddress is mutable. Let's manage neighbors in the same way, and dedup settings.
* 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: neighbor: use "struct hw_addr_data" to store link layer addressYu Watanabe2021-11-111-8/+1
|
* 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 neighborsYu Watanabe2021-09-151-0/+4
|
* network: expose hash and compare functionsYu Watanabe2021-06-071-0/+3
|
* network: use request queue to configure neighborsYu Watanabe2021-05-121-4/+7
|
* 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-061-1/+1
| | | | As 'verify' implies a boolean result.
* network: make neighbor_free() return NULLYu Watanabe2020-10-061-1/+1
|
* network: introduce network_verify_neighbors()Yu Watanabe2020-10-061-1/+2
|
* network: introduce neighbor_drop_{,foreign_}neighbors()Yu Watanabe2020-10-061-5/+2
|
* network: cleanup headers in networkd-neighbor.[ch]Yu Watanabe2020-10-061-9/+8
|
* network: drop unused argumentsYu Watanabe2020-10-061-1/+1
|
* network: make several functions staticYu Watanabe2020-10-061-7/+1
|
* network: make neighbor_{add,get}() takes Neighbor objectYu Watanabe2020-10-061-3/+3
|
* network: drop list of static neighborsYu Watanabe2020-10-061-2/+0
| | | | | [Neighbor] sections are managed by both LIST and Hashmap. Let's drop list, as they store the completely same information.
* network: move manager_rtnl_process_neighbor() to networkd-neighbor.cYu Watanabe2020-10-061-0/+2
|
* network: move link_request_set_neighbors() to networkd-neighbor.cYu Watanabe2020-10-061-0/+2
|
* networkd: Keep track of static neighborsWilliam A. Kennington III2019-08-121-4/+12
| | | | | We need to keep track of the static neighbors that are configured on the interface so that we can delete stale entries that were removed.
* network: Added neighbor lladdr support for IPv618482019-07-191-8/+1
|
* network: drop invalid [Neighbor] section earlierYu Watanabe2019-07-111-0/+2
|
* network: rename Neighbor.MACAddress= to Neighbor.LinkLayerAddress=Yu Watanabe2019-07-111-2/+13
| | | | | | And make it support IPv4 address. Closes #13015.
* network: drop sections contain invalid settings in network_verify()Yu Watanabe2019-03-131-1/+2
| | | | | | | | | | | If e.g., an [Address] section has an invalid setting, then previously assigned settings in the section is freed, and only later settings are stored. That may cause partially broken section stored in Network object. This makes if an invalid setting is found, then set 'invalid' flag instead of freeing it. And invalid sections are dropped later by network_verify().
* networkd: Static neighbor supportWilliam A. Kennington III2018-12-101-0/+37
When using networkd we currently have no way of ensuring that static neighbor entries are set when our link comes up. This change adds a new section to the network definition that allows multiple static neighbors to be set on a link.