mirror of https://github.com/ipxe/ipxe.git
[ipv6] Reduce time spent waiting for router discovery
Now that IPv6 is enabled by default for UEFI builds, it is important that iPXE does not delay unnecessarily in the (still relatively common) case of a network that lacks IPv6 routers. Apply the timeout values used for neighbour discovery to the router discovery process. Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/171/head
parent
0c25daad38
commit
6ccd5239b1
|
@ -31,6 +31,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
|||
#include <ipxe/icmpv6.h>
|
||||
#include <ipxe/neighbour.h>
|
||||
#include <ipxe/dhcpv6.h>
|
||||
#include <ipxe/timer.h>
|
||||
#include <ipxe/ndp.h>
|
||||
|
||||
/** @file
|
||||
|
@ -39,6 +40,12 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
|||
*
|
||||
*/
|
||||
|
||||
/** Router discovery minimum timeout */
|
||||
#define IPV6CONF_MIN_TIMEOUT ( TICKS_PER_SEC / 8 )
|
||||
|
||||
/** Router discovery maximum timeout */
|
||||
#define IPV6CONF_MAX_TIMEOUT ( TICKS_PER_SEC * 3 )
|
||||
|
||||
static struct ipv6conf * ipv6conf_demux ( struct net_device *netdev );
|
||||
static int
|
||||
ipv6conf_rx_router_advertisement ( struct net_device *netdev,
|
||||
|
@ -1235,6 +1242,8 @@ int start_ipv6conf ( struct interface *job, struct net_device *netdev ) {
|
|||
intf_init ( &ipv6conf->job, &ipv6conf_job_desc, &ipv6conf->refcnt );
|
||||
intf_init ( &ipv6conf->dhcp, &ipv6conf_dhcp_desc, &ipv6conf->refcnt );
|
||||
timer_init ( &ipv6conf->timer, ipv6conf_expired, &ipv6conf->refcnt );
|
||||
set_timer_limits ( &ipv6conf->timer, IPV6CONF_MIN_TIMEOUT,
|
||||
IPV6CONF_MAX_TIMEOUT );
|
||||
ipv6conf->netdev = netdev_get ( netdev );
|
||||
|
||||
/* Start timer to initiate router solicitation */
|
||||
|
|
Loading…
Reference in New Issue