summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2014-09-07 18:05:37 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2014-09-07 18:05:37 +0000
commitad234e3c3def2b73f1391a64defb5aac01b51281 (patch)
tree428e48861a6c44ba677f1db46d3d9b6f7952b9a9
parent23602b60fbd7a12c7fec00e6b47a62ced1528d9d (diff)
downloadsrc-test2-ad234e3c3def2b73f1391a64defb5aac01b51281.tar.gz
src-test2-ad234e3c3def2b73f1391a64defb5aac01b51281.zip
Notes
-rw-r--r--sys/netinet/sctp_input.c4
-rw-r--r--sys/netinet/sctp_output.c4
-rw-r--r--sys/netinet/sctp_pcb.c1
3 files changed, 4 insertions, 5 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index 66c2ac72e9b4..fa108a394de9 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -2882,9 +2882,9 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED,
SCTPDBG(SCTP_DEBUG_INPUT2,
"sctp_handle_cookie_ack: handling COOKIE-ACK\n");
- if (stcb == NULL)
+ if ((stcb == NULL) || (net == NULL)) {
return;
-
+ }
asoc = &stcb->asoc;
sctp_stop_all_cookie_timers(stcb);
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 839d8e2f18e9..6dfc5cff0005 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -5921,8 +5921,8 @@ do_a_abort:
parameter_len = (uint16_t) sizeof(struct sctp_paramhdr);
ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len);
ph->param_type = htons(SCTP_HAS_NAT_SUPPORT);
- ph->param_length = htons(sizeof(struct sctp_paramhdr));
- chunk_len += sizeof(struct sctp_paramhdr);
+ ph->param_length = htons(parameter_len);
+ chunk_len += parameter_len;
}
/* And now tell the peer which extensions we support */
num_ext = 0;
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index 0eb0ad2ca374..45de221609fe 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -6123,7 +6123,6 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
peer_supports_prsctp = 0;
peer_supports_auth = 0;
peer_supports_asconf = 0;
- peer_supports_asconf = 0;
peer_supports_reconfig = 0;
peer_supports_nrsack = 0;
peer_supports_pktdrop = 0;