aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_input.c
diff options
context:
space:
mode:
authorRandall Stewart <rrs@FreeBSD.org>2011-02-03 19:22:21 +0000
committerRandall Stewart <rrs@FreeBSD.org>2011-02-03 19:22:21 +0000
commitdec0177df602beb15a9f94c92bda75f24116502f (patch)
treee5e22bfb283c319a0287d984548f6b8bb725fcf1 /sys/netinet/sctp_input.c
parenta153864056bd3a9494ab9d9fea830ab328094a7b (diff)
downloadsrc-dec0177df602beb15a9f94c92bda75f24116502f.tar.gz
src-dec0177df602beb15a9f94c92bda75f24116502f.zip
1) Move per John Baldwin to mp_maxid
2) Some signed/unsigned errors found by Mac OS compiler (from Michael) 3) a couple of copyright updates on the effected files. MFC after: 3 months
Notes
Notes: svn path=/head/; revision=218232
Diffstat (limited to 'sys/netinet/sctp_input.c')
-rw-r--r--sys/netinet/sctp_input.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index e4a77095eebb..f6efa6c77974 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -1,5 +1,8 @@
/*-
* Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved.
+ * Copyright (c) 2008-2011, by Randall Stewart, rrs@lakerest.net and
+ * Michael Tuexen, tuexen@fh-muenster.de
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -2918,7 +2921,7 @@ sctp_handle_ecn_echo(struct sctp_ecne_chunk *cp,
uint8_t override_bit = 0;
uint32_t tsn, window_data_tsn;
int len;
- int pkt_cnt;
+ unsigned int pkt_cnt;
len = ntohs(cp->ch.chunk_length);
if ((len != sizeof(struct sctp_ecne_chunk)) &&
@@ -5933,7 +5936,7 @@ sctp_input(struct mbuf *m, int off)
int offset;
int cpu_to_use;
- if (mp_ncpus > 1) {
+ if (mp_maxid > 1) {
ip = mtod(m, struct ip *);
offset = off + sizeof(*sh);
if (SCTP_BUF_LEN(m) < offset) {
@@ -5944,7 +5947,7 @@ sctp_input(struct mbuf *m, int off)
ip = mtod(m, struct ip *);
}
sh = (struct sctphdr *)((caddr_t)ip + off);
- cpu_to_use = ntohl(sh->v_tag) % mp_ncpus;
+ cpu_to_use = ntohl(sh->v_tag) % mp_maxid;
sctp_queue_to_mcore(m, off, cpu_to_use);
return;
}