summaryrefslogtreecommitdiffstats
path: root/src/net/udp
diff options
context:
space:
mode:
authorMichael Brown2014-05-23 14:29:40 +0200
committerMichael Brown2014-05-23 15:11:11 +0200
commit6206f8f0f9b3c6fb822b6639eaffb460f5ddb9d2 (patch)
tree37447047b48c951d1f3e0286a9f1e52b1fcf28b6 /src/net/udp
parent[ipv6] Fix definition of IN6_IS_ADDR_LINKLOCAL() (diff)
downloadipxe-6206f8f0f9b3c6fb822b6639eaffb460f5ddb9d2.tar.gz
ipxe-6206f8f0f9b3c6fb822b6639eaffb460f5ddb9d2.tar.xz
ipxe-6206f8f0f9b3c6fb822b6639eaffb460f5ddb9d2.zip
[dhcpv6] Do not set sin6_scope_id on the unspecified client socket address
Setting sin6_scope_id to a non-zero value will cause the check against the "empty socket address" in udp_demux() to fail, and incoming DHCPv6 responses on interfaces other than net0 will be rejected with a spurious "No UDP connection listening on port 546" error. The transmitting network device is specified via the destination address, not the source address. Fix by simply not setting sin6_scope_id on the client socket address. Reported-by: Anton D. Kachalov <mouse@yandex-team.ru> Tested-by: Anton D. Kachalov <mouse@yandex-team.ru> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/udp')
-rw-r--r--src/net/udp/dhcpv6.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/net/udp/dhcpv6.c b/src/net/udp/dhcpv6.c
index cbc8d794..f7736d08 100644
--- a/src/net/udp/dhcpv6.c
+++ b/src/net/udp/dhcpv6.c
@@ -924,7 +924,6 @@ int start_dhcpv6 ( struct interface *job, struct net_device *netdev,
/* Construct client and server addresses */
memset ( &addresses, 0, sizeof ( addresses ) );
addresses.client.sin6.sin6_family = AF_INET6;
- addresses.client.sin6.sin6_scope_id = netdev->index;
addresses.client.sin6.sin6_port = htons ( DHCPV6_CLIENT_PORT );
addresses.server.sin6.sin6_family = AF_INET6;
ipv6_all_dhcp_relay_and_servers ( &addresses.server.sin6.sin6_addr );