diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-11-20 21:59:52 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-11-20 21:59:52 +0100 |
commit | d5541eb74bc59b7c03a80b0ece637411867803bf (patch) | |
tree | 74b42754700f63e06000d335fe53bfc77fec8679 /pfinet | |
parent | 3206e09443e604d8aa5d20f75fd39357d0bf03d4 (diff) | |
parent | 871d7b945a5d0c788b68e586bd03afeb3812a834 (diff) |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd
Diffstat (limited to 'pfinet')
-rw-r--r-- | pfinet/linux-src/net/ipv6/udp_ipv6.c | 8 | ||||
-rw-r--r-- | pfinet/socket-ops.c | 3 |
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)) |