summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pfinet/linux-src/net/ipv6/udp_ipv6.c8
-rw-r--r--pfinet/socket-ops.c3
2 files changed, 10 insertions, 1 deletions
diff --git a/pfinet/linux-src/net/ipv6/udp_ipv6.c b/pfinet/linux-src/net/ipv6/udp_ipv6.c
index 4511c024..1886e8ac 100644
--- a/pfinet/linux-src/net/ipv6/udp_ipv6.c
+++ b/pfinet/linux-src/net/ipv6/udp_ipv6.c
@@ -212,6 +212,14 @@ int udpv6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
goto ipv4_connected;
}
+ if (usin->sin6_family == AF_UNSPEC) {
+ udp_connect(sk, uaddr, addr_len);
+ ipv6_addr_set(&np->daddr, 0, 0, 0, 0);
+ ipv6_addr_set(&np->saddr, 0, 0, 0, 0);
+ ipv6_addr_set(&np->rcv_saddr, 0, 0, 0, 0);
+ return 0;
+ }
+
if (addr_len < sizeof(*usin))
return(-EINVAL);
diff --git a/pfinet/socket-ops.c b/pfinet/socket-ops.c
index b9ce6c72..02675425 100644
--- a/pfinet/socket-ops.c
+++ b/pfinet/socket-ops.c
@@ -299,7 +299,8 @@ S_socket_create_address (mach_port_t server,
struct sock_addr *addrstruct;
const struct sockaddr *const sa = (void *) data;
- if (sockaddr_type != AF_INET && sockaddr_type != AF_INET6)
+ if (sockaddr_type != AF_INET && sockaddr_type != AF_INET6
+ && sockaddr_type != AF_UNSPEC)
return EAFNOSUPPORT;
if (sa->sa_family != sockaddr_type
|| data_len < offsetof (struct sockaddr, sa_data))