Commit graph

368 commits

Author SHA1 Message Date
Ariadne Conill
3b178131bd state: sync refcounts using mapped interface name, not physical interface name 2020-09-08 19:25:00 -06:00
Ariadne Conill
b514d31c26 ifupdown: implement --force 2020-09-08 19:17:00 -06:00
Ariadne Conill
efe9b60e37 ifupdown: skip interface config/deconfig based on refcounts 2020-09-08 19:10:20 -06:00
Ariadne Conill
8de83fdd9a tests: add tests for deferred interface teardown (refcounting) 2020-09-08 16:02:24 -06:00
Ariadne Conill
f139bc2416 lifecycle: consider an interface eligible for takedown if it has only one dependent (itself) 2020-09-08 15:50:32 -06:00
Ariadne Conill
ca07082ff4 state: fix parsing interface names in ifstate files 2020-09-08 15:37:35 -06:00
Ariadne Conill
6603ff1000 lifecycle: use refcounting to defer interface teardown 2020-09-08 15:28:36 -06:00
Ariadne Conill
288976f015 libifupdown: introduce lif_state_ref_if() and lif_state_unref_if(). 2020-09-08 15:05:02 -06:00
Ariadne Conill
865bf7cac6 state: plug memory leak when upserting 2020-09-08 15:02:39 -06:00
Ariadne Conill
8e4eb5d00c state: migrate to lif_state_record from a bare dictionary containing the mapped ifs 2020-09-08 14:59:58 -06:00
Ariadne Conill
923b96fab8 state: use lif_next_token() when parsing ifstate files 2020-09-08 14:46:07 -06:00
Ariadne Conill
3b10494b40 change lif_interface.is_up to lif_interface.refcount 2020-09-08 14:41:25 -06:00
Ariadne Conill
30fa4c4a2e
Merge pull request #65 from ifupdown-ng/chore/constify
lifecycle: constify lif_interface access in several functions
2020-09-07 13:42:50 -06:00
Ariadne Conill
ae1dc41c88 lifecycle: constify lif_interface access in several functions 2020-09-07 13:41:11 -06:00
Maximilian Wilhelm
9784392a68
Merge pull request #61 from BarbarossaTM/link
Refactor management of vlans and dummy interfaces
2020-09-05 00:29:31 +02:00
Maximilian Wilhelm
32b7dda832 tests: Add test for dummy link creation.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-09-05 00:28:12 +02:00
Maximilian Wilhelm
4a05010539 tests: Fix vlan_explicit_depend_body.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-09-05 00:24:40 +02:00
Maximilian Wilhelm
aa3e94acf8 link executor: Make link deletion MOCKable again.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-09-05 00:18:43 +02:00
Maximilian Wilhelm
d24b4ab3e6 link executor: Make dummy creation MOCKable, too
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-09-05 00:15:26 +02:00
Maximilian Wilhelm
37a7d8f097 link executor: Make vlan disposal MOCKable again
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-09-05 00:15:01 +02:00
Maximilian Wilhelm
58f010fe91 tests: Reflect latest link executor changes
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-09-04 23:54:40 +02:00
Maximilian Wilhelm
2e6b3ca1ff link executor: Better error message on conflicting link types.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-09-04 23:33:27 +02:00
Maximilian Wilhelm
a6b95d495c link executor: Only gather and set IFACE_OPTIONS on up.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-09-04 23:32:51 +02:00
Maximilian Wilhelm
0e5ec5b260 link executor: Refactor VLAN iface management
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-09-04 23:21:21 +02:00
Ariadne Conill
a59109cb66
Merge pull request #60 from ifupdown-ng/feature/wireguard
wireguard executor implementation
2020-09-04 12:31:13 -07:00
Ariadne Conill
acb555b75a tests: add wireguard tests 2020-09-04 13:10:57 -06:00
Ariadne Conill
f32481deb9 add wireguard executor script 2020-09-04 12:57:41 -06:00
Maximilian Wilhelm
471549db4b
Merge pull request #56 from BarbarossaTM/alias
link executor: Add support for interface aliases.
2020-09-04 09:20:15 +02:00
Maximilian Wilhelm
6805262a9b link executor: Add support for interface aliases.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-09-04 09:14:45 +02:00
Ariadne Conill
2311316bfe
Merge pull request #55 from ifupdown-ng/feature/udhcpc-opts
add support for udhcpc-opts
2020-09-03 15:15:31 -07:00
Ariadne Conill
7edb29778b tests: add udhcp-opts related tests 2020-09-03 16:11:41 -06:00
Ariadne Conill
2d7668bc01 dhcp executor: add support for udhcpc-opts property 2020-09-03 16:07:27 -06:00
Ariadne Conill
4b32a0787d
Merge pull request #51 from BarbarossaTM/whitespaces
Remove leading whitespaces around interface attribute values.
2020-08-30 15:39:01 -06:00
Ariadne Conill
ab7ff2b206
Merge pull request #54 from BarbarossaTM/dummy
Only create dummy interface when missing and remove them on post-down
2020-08-30 15:38:32 -06:00
Maximilian Wilhelm
e854819e8f link executor: Delete dummy interface in post-down.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-08-30 22:38:58 +02:00
Maximilian Wilhelm
7d81ceb898 link executor: Only create dummy interface when not present.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-08-30 22:38:38 +02:00
Maximilian Wilhelm
64b24b02ed Remove leading whitespaces before interface attribute values.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-08-30 22:18:07 +02:00
Ariadne Conill
375b5d46cb
Merge pull request #52 from BarbarossaTM/scripts
lifecycle: Check if script dir exists before executing run-parts.
2020-08-29 08:38:16 -06:00
Maximilian Wilhelm
570679c5bf lifecycle: Make sure to return true when script dir doesn't exist.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-08-27 12:10:12 +02:00
Maximilian Wilhelm
61ed18db2c lifecycle: Check if script dir exist before executing run-parts.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-08-27 01:15:51 +02:00
Maximilian Wilhelm
1f21d2bb45
Merge pull request #50 from BarbarossaTM/link-type
Add support for dummy interfaces
2020-08-27 00:49:47 +02:00
Maximilian Wilhelm
8f3e1f06f1 link executor: Fix indentation.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-08-27 00:47:51 +02:00
Ariadne Conill
583ff684df
Merge pull request #48 from BarbarossaTM/vrf-fix
static executor: Use vrf-member when setting gateway if present.
2020-08-26 15:50:29 -06:00
Maximilian Wilhelm
e51ce613e6 link executor: Add support for dummy interfaces.
closes #49

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-08-26 23:05:28 +02:00
Maximilian Wilhelm
36fe61d8e7 link executor: Unify code paths.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-08-26 22:41:32 +02:00
Maximilian Wilhelm
e52e94fe5e static executor: Use vrf-member when setting gateway if present.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-08-26 22:29:59 +02:00
Ariadne Conill
d21d83fb26
Merge pull request #44 from ifupdown-ng/feature/link-hwaddress
link executor: add support for hwaddress option
2020-08-26 03:36:06 -06:00
Ariadne Conill
14914f1251 executors: use set -e consistently 2020-08-26 03:35:18 -06:00
Ariadne Conill
68415ce71d link executor: add support for hwaddress option 2020-08-26 02:22:30 -06:00
Ariadne Conill
e7ef2d1e83
Merge pull request #43 from ifupdown-ng/feature/phase-exec-messages
execute: note the phase each executor is being invoked in
2020-08-26 02:12:57 -06:00