summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_output.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-02-28 10:08:29 -0300
committerRenato Botelho <renato@netgate.com>2016-02-28 10:08:29 -0300
commitafdadc06a5da33ea6f46448ec5a8244cf6bf754d (patch)
tree0d5fcd0eacffb1f234a3c97e9ea66a4b6d28d973 /sys/netinet/sctp_output.c
parenta0ada2282856db4c48a6cbeadba5e7c6d74d45cf (diff)
parent15dc3e2435d0a1243a7938c5eda77de938e4f5de (diff)
downloadFreeBSD-src-afdadc06a5da33ea6f46448ec5a8244cf6bf754d.zip
FreeBSD-src-afdadc06a5da33ea6f46448ec5a8244cf6bf754d.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/netinet/sctp_output.c')
-rw-r--r--sys/netinet/sctp_output.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 1c16aaa..c7d3748 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -3222,12 +3222,14 @@ plan_d:
}
}
#ifdef INET
- if ((retried == 0) && (stcb->asoc.scope.ipv4_local_scope == 0)) {
- stcb->asoc.scope.ipv4_local_scope = 1;
- retried = 1;
- goto again_with_private_addresses_allowed;
- } else if (retried == 1) {
- stcb->asoc.scope.ipv4_local_scope = 0;
+ if (stcb) {
+ if ((retried == 0) && (stcb->asoc.scope.ipv4_local_scope == 0)) {
+ stcb->asoc.scope.ipv4_local_scope = 1;
+ retried = 1;
+ goto again_with_private_addresses_allowed;
+ } else if (retried == 1) {
+ stcb->asoc.scope.ipv4_local_scope = 0;
+ }
}
#endif
out:
@@ -10629,7 +10631,7 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked
* Clear all bits corresponding to TSNs
* smaller or equal to the cumulative TSN.
*/
- tsn_map &= (~0 << (1 - offset));
+ tsn_map &= (~0U << (1 - offset));
}
selector = &sack_array[tsn_map];
if (mergeable && selector->right_edge) {
@@ -10704,7 +10706,7 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked
* TSNs smaller or equal to the
* cumulative TSN.
*/
- tsn_map &= (~0 << (1 - offset));
+ tsn_map &= (~0U << (1 - offset));
}
selector = &sack_array[tsn_map];
if (mergeable && selector->right_edge) {
OpenPOWER on IntegriCloud