[ipv6] Separate the concepts of prefix and address creation

Allow for IPv6 routing table entries to be created for an on-link
prefix where a local address has not yet been assigned to the network
device.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2013-11-15 15:12:25 +00:00
parent 3f9a482b88
commit 6b1eee0452
4 changed files with 206 additions and 129 deletions

View File

@@ -44,8 +44,10 @@ static void route_ipv6_print ( struct net_device *netdev ) {
printf ( "%s: %s/%d", netdev->name,
inet6_ntoa ( &miniroute->address ),
miniroute->prefix_len );
if ( miniroute->has_router )
if ( miniroute->flags & IPV6_HAS_ROUTER )
printf ( " gw %s", inet6_ntoa ( &miniroute->router ) );
if ( ! ( miniroute->flags & IPV6_HAS_ADDRESS ) )
printf ( " (no address)" );
if ( ! netdev_is_open ( miniroute->netdev ) )
printf ( " (inaccessible)" );
printf ( "\n" );