diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2016-05-01 21:48:55 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2016-05-01 21:48:55 +0000 |
commit | ec70917ffad285039e533a5334e73e253d2ee289 (patch) | |
tree | fb83dcefc2682b80bf43ff446482a5b7b31c2ccb /sys/netinet/sctp_usrreq.c | |
parent | 71a53e69d65ecf61a175e8d6ccf153d6a031279b (diff) | |
download | src-ec70917ffad285039e533a5334e73e253d2ee289.tar.gz src-ec70917ffad285039e533a5334e73e253d2ee289.zip |
When a client uses UDP encapsulation and lists IP addresses in the INIT
chunk, enable UDP encapsulation for all those addresses.
This helps clients using a userland stack to support multihoming if
they are not behind a NAT.
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=298902
Diffstat (limited to 'sys/netinet/sctp_usrreq.c')
-rw-r--r-- | sys/netinet/sctp_usrreq.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 85efd8e9f157..49d3e42fe486 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -1474,6 +1474,7 @@ sctp_do_connect_x(struct socket *so, struct sctp_inpcb *inp, void *optval, /* We are GOOD to go */ stcb = sctp_aloc_assoc(inp, sa, &error, 0, vrf_id, inp->sctp_ep.pre_open_stream_count, + inp->sctp_ep.port, (struct thread *)p ); if (stcb == NULL) { @@ -6999,7 +7000,9 @@ sctp_connect(struct socket *so, struct sockaddr *addr, struct thread *p) } vrf_id = inp->def_vrf_id; /* We are GOOD to go */ - stcb = sctp_aloc_assoc(inp, addr, &error, 0, vrf_id, inp->sctp_ep.pre_open_stream_count, p); + stcb = sctp_aloc_assoc(inp, addr, &error, 0, vrf_id, + inp->sctp_ep.pre_open_stream_count, + inp->sctp_ep.port, p); if (stcb == NULL) { /* Gak! no memory */ goto out_now; |