Commit graph

540 commits

Author SHA1 Message Date
Ariadne Conill
086eca2b4e
Merge pull request #109 from ifupdown-ng/feature/include-loop-detection
refactor config file management
2020-10-14 04:54:47 -06:00
Ariadne Conill
f6fe06298f doc: interfaces: document source and source-directory options 2020-10-14 04:29:25 -06:00
Ariadne Conill
ee5e8b5702 interface-file: implement source-directory 2020-10-14 04:26:26 -06:00
Ariadne Conill
5035d2e160 interface-file: handle_generic(): drop unnecessary unused declaration for state 2020-10-14 04:12:59 -06:00
Ariadne Conill
8d4c7461af interface-file: break loops using lif_interface_file_parse_state.loaded dictionary 2020-10-14 04:07:14 -06:00
Ariadne Conill
0df3e03b68 interface-file: fully encapsulate cur_iface into lif_interface_file_parse_state 2020-10-14 04:00:39 -06:00
Ariadne Conill
dcb6ef97ef cmd: use lif_interface_file_parse_state structure as needed 2020-10-14 03:50:58 -06:00
Ariadne Conill
3bcfe91e84 interface-file: simplify state management a bit 2020-10-14 03:48:20 -06:00
Ariadne Conill
d76c2df460
Merge pull request #108 from ifupdown-ng/feature/openrc-init-script
openrc init script
2020-10-14 03:04:18 -06:00
Ariadne Conill
ef3be06b38 openrc: add networking.confd describing the config options 2020-10-14 02:52:59 -06:00
Ariadne Conill
1668d17c6b openrc: use -S to consistently define the state database location 2020-10-14 02:48:51 -06:00
Ariadne Conill
fcea23dbcd openrc: use ifquery -r to determine which interfaces to stop 2020-10-14 02:47:52 -06:00
Ariadne Conill
311ad74792 doc: document ifquery -r 2020-10-14 02:45:16 -06:00
Ariadne Conill
e300867d26 ifquery: add ifquery --running
this is like ifquery --state except it dumps only the running interface names
2020-10-14 02:44:00 -06:00
Ariadne Conill
89d84ec475 openrc: use ifquery -L for find_ifaces() 2020-10-14 02:38:05 -06:00
Ariadne Conill
3b7181cf28 import networking.initd from alpine 2020-10-14 02:32:05 -06:00
Ariadne Conill
24bfcc1737
Merge pull request #107 from BarbarossaTM/bugfix/seperate-netmask
Always convert netmasks to CIDR when configuring interfaces
2020-10-13 18:41:51 -06:00
Maximilian Wilhelm
de207a5950 lifecyle: Use lif_address_format_cidr() for IF_ADDRESSES
Previously IF_ADDRESSES would not contain a prefix length if the address
  entry in the configuration did not was in CIDR format but had a netmask
  set seperately. This commit fixes that behaviour and computes a CIDR
  netmask if necessary.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-14 01:47:49 +02:00
Maximilian Wilhelm
365461a6f6 interface: Consider the lif_interface as const in lif_address_format_cidr()
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-14 01:45:14 +02:00
Maximilian Wilhelm
a72d87df0b dict: lif_dict_find() + lif_dict_find_all() do not touch the dict, so mark it const.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-14 01:39:31 +02:00
Maximilian Wilhelm
02324bebd5 Move handling of address/netmask pairs from ifquery into library.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-14 01:24:33 +02:00
Ariadne Conill
17a410b87c
Merge pull request #106 from BarbarossaTM/doc/update
Update build documentation as well as admin guide
2020-10-13 18:14:50 -04:00
Maximilian Wilhelm
98ba7f46cf dist: Point out valid values and defaults in example config.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-14 00:12:47 +02:00
Maximilian Wilhelm
68c51a79e7 doc: Add /etc/network/ifupdown-ng.conf to admin guide.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-14 00:12:47 +02:00
Maximilian Wilhelm
f707c5c1ef doc: Update build section in README
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-14 00:12:24 +02:00
Maximilian Wilhelm
6423a284b8 doc: Update build section in README
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-14 00:11:37 +02:00
Ariadne Conill
172daa16a0
Merge pull request #85 from ifupdown-ng/feature/dependency-loop-breaking
lifecycle: add lif_interface.is_pending to break dependency cycles
2020-10-10 22:42:34 -04:00
Ariadne Conill
a1828c688b
Merge pull request #104 from BarbarossaTM/chore/executor-cleanup
bond executor: grep for options only once
2020-10-10 22:42:13 -04:00
Maximilian Wilhelm
2d32b1577c bond executor: grep for options only once
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-11 03:28:23 +02:00
Ariadne Conill
4c354ebf35 ifquery: implement more robust loop breaking strategy 2020-10-08 02:17:13 -06:00
Ariadne Conill
959617df88 tests: add dependency loop breaking test for ifdown 2020-10-08 02:09:30 -06:00
Ariadne Conill
0cade539f8 tests: ifup: add dependency loop breaking test 2020-10-08 02:05:43 -06:00
Ariadne Conill
122a54377d lifecycle: break dependency cycles when calculating the full dependency graph 2020-10-08 02:01:46 -06:00
Ariadne Conill
b2e657cdf0 tests: add dependency loop fixture 2020-10-08 02:00:18 -06:00
Ariadne Conill
175f002b3e lifecycle: add lif_interface.is_pending to break dependency cycles 2020-10-08 01:49:44 -06:00
Maximilian Wilhelm
953b2274f7
Merge pull request #102 from BarbarossaTM/docs/fixes
docs: Fix format of VXLAN examples
2020-10-06 21:02:11 +02:00
Maximilian Wilhelm
5db2f29891 docs: Fix format of VXLAN examples.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-06 21:00:14 +02:00
Maximilian Wilhelm
a67d518ea9
Merge pull request #101 from BarbarossaTM/feature/batman-options
Generalize B.A.T.M.A.N. .adv. option handling
2020-10-06 20:22:19 +02:00
Ariadne Conill
5b6cb5a128
Merge pull request #100 from BarbarossaTM/chore/addresses-and-gateways-env
Expose all adresses and gateways as environment variables
2020-10-05 23:46:15 -04:00
Maximilian Wilhelm
13a8daf96e batman executor: Work around excution order limitations for now.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-06 05:17:48 +02:00
Maximilian Wilhelm
27a7201b45 batman executor: Generalize option handling.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-06 05:05:28 +02:00
Maximilian Wilhelm
332ea7c7d3 Stick to upstream naming of hop-penalty instead of interface penalty for hardifs.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-06 05:05:28 +02:00
Maximilian Wilhelm
59290415a0 batman executor: Allow settings the B.A.T.M.A.N. adv. routing algorithm
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-06 05:05:28 +02:00
Maximilian Wilhelm
5d6c7732ed static executor: Ignore errors while removing addresses
When having multiple addresses set from the same prefix they might/will(?)
  be configured as 'secondary' and implicitly removed when removing the
  non-secondary address. This leads ip complaining about not being able
  to remove the secondaries as they are already gone. So we ignore errors
  while deconfiguring addresses as they liked occur when removing a
  vanish address anyway.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-06 04:50:02 +02:00
Maximilian Wilhelm
5302bee850 lifecycle: Don't leak allocated memory.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-06 04:50:02 +02:00
Maximilian Wilhelm
1a2298a759 lifecycle: Use snprintf() in favor of sprintf()
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-06 04:50:02 +02:00
Maximilian Wilhelm
99b0d67b8e lifecycle: Remove debugging statement.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-06 04:50:02 +02:00
Maximilian Wilhelm
4a8230f916 tests: Update static executor test to reflect latest change.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-06 04:49:46 +02:00
Maximilian Wilhelm
5557804af9 static executor: Update executor to use env vars.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-06 04:43:12 +02:00
Maximilian Wilhelm
44be0c0721 Add myself to copyright notice in version information.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-10-06 04:43:12 +02:00