summaryrefslogtreecommitdiff
path: root/src/network/networkd-routing-policy-rule.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #18243 from ssahani/ensure-put-useYu Watanabe2021-01-171-5/+1
|\ | | | | tree-wide: introduce hashmap_ensure_put() and use it
| * network: routing policy rule - Use hashmap_ensure_putSusant Sahani2021-01-151-5/+1
| |
* | network: routing-policy-rule - TAKE_PTRSusant Sahani2021-01-161-23/+13
|/
* network: drop fib rules configured with Family=bothYu Watanabe2020-12-301-4/+30
|
* network: set RoutingPolicyRule::family based on Family= settingYu Watanabe2020-12-301-2/+7
|
* network: always re-configure rules even if already existYu Watanabe2020-12-301-34/+40
| | | | | routing_policy_rule_get() in link_set_routing_policy_rules() does not work when [RoutingPolicyRule] section does not have From= or To=.
* network: drop unnecessary checksYu Watanabe2020-12-301-4/+2
| | | | By the previous commit, the checks are not necessary any more.
* network: fix possible memory leakYu Watanabe2020-12-301-2/+2
| | | | | When set_put() returns 0, then already stored rule will be unref()ed from Manager.
* network: constify several argumentsYu Watanabe2020-12-301-9/+9
|
* network: do not serialize/deserialize routing policy rulesYu Watanabe2020-12-291-370/+0
| | | | | | We already handle foreign routing policy rules correctly by the previous commit. So, the serialization/deserialization of rules are not necessary anymore.
* network: drop unnecessary routing policy rulesYu Watanabe2020-12-291-2/+30
| | | | | | | | | | | | 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.
* network: treat rule which has l3mdev flag as created by kernelYu Watanabe2020-12-291-0/+17
|
* network: adjust protocol of rules sent from kernel when kernel does not ↵Yu Watanabe2020-12-291-1/+30
| | | | | | support FRA_PROTOCOL Otherwise, each configured rule is treated as foreign.
* network: set FRA_PROTOCOL to RTPROT_STATIC by defaultYu Watanabe2020-12-291-9/+27
|
* network: Allow to configure unreachable/blackhole RoutingPolicyRule (#17984)Susant Sahani2020-12-181-1/+82
|
* sd-netlink: routing policy rule port to fib_rule_hdrSusant Sahani2020-12-171-4/+4
|
* network: use netlink_message_read_in_addr_union() where applicableYu Watanabe2020-12-141-52/+17
|
* network: introduce log_routing_policy_rule_debug()Yu Watanabe2020-12-141-33/+26
|
* network: introduce routing_policy_rule_equal()Yu Watanabe2020-12-141-1/+11
|
* network: make routing_policy_rule_remove() take Manager instead of LinkYu Watanabe2020-12-141-33/+19
| | | | As routing policy rules are managed by Manager.
* network: do not configure static configs more than once simultaneouslyYu Watanabe2020-12-111-0/+5
|
* 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: specify all known attributes when removing routing policy rulesYu Watanabe2020-10-071-117/+115
| | | | Otherwise, routing_policy_rule_remove() may removes unintended rule.
* network: add missing "else"Yu Watanabe2020-10-071-1/+1
|
* network: drop unused elementYu Watanabe2020-10-071-2/+0
|
* network: introduce network_verify_routing_policy_rules()Yu Watanabe2020-10-071-1/+11
|
* network: make routing_policy_rule_new() staticYu Watanabe2020-10-071-24/+26
|
* network: move manager_rtnl_process_rule() to networkd-routing-policy-rule.[ch]Yu Watanabe2020-10-071-2/+232
|
* network: drop list of static routing policy rulesYu Watanabe2020-10-071-34/+23
| | | | | [RoutingPolicyRule] sections are managed by both LIST and Hashmap. Let's drop list.
* network: do not duplicate rule if Family=bothYu Watanabe2020-10-071-39/+36
|
* network: make routing_policy_rule_free() returns NULLYu Watanabe2020-10-071-4/+4
|
* network: add more logs on loading routing policy rules failureYu Watanabe2020-10-071-23/+24
| | | | And reduce scope of variables.
* network: reduce scope of variablesYu Watanabe2020-10-061-7/+12
|
* network: drop routing_policy_rule_make_local()Yu Watanabe2020-10-061-26/+15
| | | | Its error handling was bogus...
* network: make several functions staticYu Watanabe2020-10-061-147/+147
|
* network: move link_request_set_routing_policy()Yu Watanabe2020-10-061-0/+35
|
* network: replace FRA_IFNAME -> FRA_IIFNAMEYu Watanabe2020-09-101-2/+2
| | | | No functional change, as FRA_IFNAME is an alias of FRA_IIFNAME.
* network: fix the default mask for FirewallMark=Yu Watanabe2020-09-101-8/+11
| | | | | | | | And always send FRA_FWMASK if FirewallMark= is set. C.f. https://github.com/torvalds/linux/commit/b8964ed9fa727109c9084abc807652ebfb681c18 Partially fixes #16784.
* network: do not assign return value if the parse_fwmark_fwmask() failsYu Watanabe2020-09-101-15/+20
| | | | | This also removes redundant logs, and makes input string not copied if it does not contain '/'.
* network: add debug log for removing routing policy rulesYu Watanabe2020-09-101-10/+21
|
* network: also logs priority of routing policy rulesYu Watanabe2020-09-101-2/+2
|
* tree-wide: define iterator inside of the macroZbigniew Jędrzejewski-Szmek2020-09-081-6/+3
|
* network: logs about unknown keyYu Watanabe2020-09-041-1/+2
|
* network: honor already specified family when parsing from= or to= in ↵Yu Watanabe2020-09-041-20/+26
| | | | serialized rule
* network: do not reallocate bufferYu Watanabe2020-09-041-4/+8
|
* network: serialize InvertRule= in [RoutingPolicyRule]Yu Watanabe2020-09-041-1/+9
|
* network: add whitespace after family= and priority= in serialized routing ↵Yu Watanabe2020-09-041-7/+12
| | | | | | policy rule This also makes priority= serialized only when its value is non-zero.
* network: downgrade error level when the error is ignoredYu Watanabe2020-09-041-12/+12
|
* network: move routing_policy_rule_read_full_file()Yu Watanabe2020-09-041-20/+20
|