summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctputil.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2016-04-30 14:25:00 +0000
committertuexen <tuexen@FreeBSD.org>2016-04-30 14:25:00 +0000
commit20431f1fdeea72f57a3a56126ba1e194a9b8d076 (patch)
treee8ba81835acfd1629b42b9a2978459ef3f17379e /sys/netinet/sctputil.c
parentc153cda74ffc48a9f7e32a28c75776f1f395267e (diff)
downloadFreeBSD-src-20431f1fdeea72f57a3a56126ba1e194a9b8d076.zip
FreeBSD-src-20431f1fdeea72f57a3a56126ba1e194a9b8d076.tar.gz
Add the UDP encaps port as a parameter to sctp_add_remote_addr().
This is currently only a code change without any functional change. But this allows to set the remote encapsulation port in a more detailed way, which will be provided in a follow-up commit. MFC after: 1 week
Diffstat (limited to 'sys/netinet/sctputil.c')
-rw-r--r--sys/netinet/sctputil.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index 99bfa78..2548146 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -6277,7 +6277,9 @@ sctp_connectx_helper_add(struct sctp_tcb *stcb, struct sockaddr *addr,
*error = EINVAL;
goto out_now;
}
- if (sctp_add_remote_addr(stcb, sa, NULL, SCTP_DONOT_SETSCOPE, SCTP_ADDR_IS_CONFIRMED)) {
+ if (sctp_add_remote_addr(stcb, sa, NULL, stcb->asoc.port,
+ SCTP_DONOT_SETSCOPE,
+ SCTP_ADDR_IS_CONFIRMED)) {
/* assoc gone no un-lock */
SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ENOBUFS);
(void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC,
@@ -6300,7 +6302,9 @@ sctp_connectx_helper_add(struct sctp_tcb *stcb, struct sockaddr *addr,
*error = EINVAL;
goto out_now;
}
- if (sctp_add_remote_addr(stcb, sa, NULL, SCTP_DONOT_SETSCOPE, SCTP_ADDR_IS_CONFIRMED)) {
+ if (sctp_add_remote_addr(stcb, sa, NULL, stcb->asoc.port,
+ SCTP_DONOT_SETSCOPE,
+ SCTP_ADDR_IS_CONFIRMED)) {
/* assoc gone no un-lock */
SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ENOBUFS);
(void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC,
OpenPOWER on IntegriCloud