diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2018-07-03 16:24:58 +1000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2018-07-09 15:13:07 +1000 |
commit | 6fa0edfb029726968cbacad9d4e193a345956ff3 (patch) | |
tree | f406c1621bb407b9affe4af522dbc6ec0e626524 /test/parser | |
parent | 13cc5c5d57318a6c2043168277862b3704a7d3d9 (diff) | |
download | talos-petitboot-6fa0edfb029726968cbacad9d4e193a345956ff3.tar.gz talos-petitboot-6fa0edfb029726968cbacad9d4e193a345956ff3.zip |
discover: implement a periodic requery for network devices
If we boot a machine before external (network) dependencies are properly
configured, it will have tried once to download configuration, and
possibly failed due to that configuration not being present.
This change introduces a periodic requery of network resources. After a
timeout, petitboot will either re-acquire its DHCP lease (causing any
downloads to be re-processed, possibly with different parameters from
the new lease), or re-download a statically defined URL.
This timeout defaults to five minutes (similar to pxelinux), and is
configurable by DHCP option 211, "reboot time".
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
[added test stub]
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'test/parser')
-rw-r--r-- | test/parser/network.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/parser/network.c b/test/parser/network.c index 9c57309..6870dd2 100644 --- a/test/parser/network.c +++ b/test/parser/network.c @@ -51,3 +51,10 @@ uint8_t *find_mac_by_name(void *ctx, struct network *network, return talloc_memdup(ctx, &interface->hwaddr, sizeof(uint8_t) * HWADDR_SIZE); } + +void network_requery_device(struct network *network, + struct discover_device *dev) +{ + (void)network; + (void)dev; +} |