summaryrefslogtreecommitdiffstats
path: root/src/net/udp
diff options
context:
space:
mode:
authorMichael Brown2016-07-19 18:49:50 +0200
committerMichael Brown2016-07-20 14:02:44 +0200
commitc34d1518eb446d596087ed2b9dda33a513f7e980 (patch)
treea15c1ffcaccdbe92803a55e0d41784039db46643 /src/net/udp
parent[ipv6] Match user expectations for IPv6 settings priorities (diff)
downloadipxe-c34d1518eb446d596087ed2b9dda33a513f7e980.tar.gz
ipxe-c34d1518eb446d596087ed2b9dda33a513f7e980.tar.xz
ipxe-c34d1518eb446d596087ed2b9dda33a513f7e980.zip
[ipv6] Create routing table based on IPv6 settings
Use the IPv6 settings to construct the routing table, in a matter analogous to the construction of the IPv4 routing table. This allows for manual assignment of IPv6 addresses via e.g. set net0/ip6 2001:ba8:0:1d4::6950:5845 set net0/len6 64 set net0/gateway6 fe80::226:bff:fedd:d3c0 The prefix length ("len6") may be omitted, in which case a default prefix length of 64 will be assumed. Multiple IPv6 addresses may be assigned manually by implicitly creating child settings blocks. For example: set net0/ip6 2001:ba8:0:1d4::6950:5845 set net0.ula/ip6 fda4:2496:e992::6950:5845 Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/udp')
-rw-r--r--src/net/udp/dhcpv6.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/net/udp/dhcpv6.c b/src/net/udp/dhcpv6.c
index a2c69aaa..253032e4 100644
--- a/src/net/udp/dhcpv6.c
+++ b/src/net/udp/dhcpv6.c
@@ -462,8 +462,6 @@ enum dhcpv6_session_state_flags {
DHCPV6_RX_RECORD_SERVER_ID = 0x04,
/** Record received IPv6 address */
DHCPV6_RX_RECORD_IAADDR = 0x08,
- /** Apply received IPv6 address */
- DHCPV6_RX_APPLY_IAADDR = 0x10,
};
/** DHCPv6 request state */
@@ -471,7 +469,7 @@ static struct dhcpv6_session_state dhcpv6_request = {
.tx_type = DHCPV6_REQUEST,
.rx_type = DHCPV6_REPLY,
.flags = ( DHCPV6_TX_IA_NA | DHCPV6_TX_IAADDR |
- DHCPV6_RX_RECORD_IAADDR | DHCPV6_RX_APPLY_IAADDR ),
+ DHCPV6_RX_RECORD_IAADDR ),
.next = NULL,
};
@@ -870,19 +868,6 @@ static int dhcpv6_rx ( struct dhcpv6_session *dhcpv6,
dhcpv6->server_duid_len );
}
- /* Apply identity association address, if applicable */
- if ( dhcpv6->state->flags & DHCPV6_RX_APPLY_IAADDR ) {
- if ( ( rc = ipv6_set_address ( dhcpv6->netdev,
- &dhcpv6->lease ) ) != 0 ) {
- DBGC ( dhcpv6, "DHCPv6 %s could not apply %s: %s\n",
- dhcpv6->netdev->name,
- inet6_ntoa ( &dhcpv6->lease ), strerror ( rc ) );
- /* This is plausibly the error we want to return */
- dhcpv6->rc = rc;
- goto done;
- }
- }
-
/* Transition to next state, if applicable */
if ( dhcpv6->state->next ) {
dhcpv6_set_state ( dhcpv6, dhcpv6->state->next );