Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
92ef2cae
Commit
92ef2cae
authored
Feb 17, 2004
by
Sridhar Samudrala
Browse files
Options
Browse Files
Download
Plain Diff
Merge us.ibm.com:/home/sridhar/BK/linux-2.6
into us.ibm.com:/home/sridhar/BK/lksctp-2.6.2
parents
7d202bd0
a1ec4338
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
11 deletions
+28
-11
net/sctp/Kconfig
net/sctp/Kconfig
+8
-2
net/sctp/ssnmap.c
net/sctp/ssnmap.c
+20
-9
No files found.
net/sctp/Kconfig
View file @
92ef2cae
...
...
@@ -74,13 +74,19 @@ config SCTP_HMAC_NONE
establishment. It is advised to use either HMAC-MD5 or HMAC-SHA1.
config SCTP_HMAC_SHA1
bool "HMAC-SHA1" if CRYPTO_HMAC=y && CRYPTO_SHA1=y || CRYPTO_SHA1=m
bool "HMAC-SHA1"
select CRYPTO
select CRYPTO_HMAC
select CRYPTO_SHA1
help
Enable the use of HMAC-SHA1 during association establishment. It
is advised to use either HMAC-MD5 or HMAC-SHA1.
config SCTP_HMAC_MD5
bool "HMAC-MD5" if CRYPTO_HMAC=y && CRYPTO_MD5=y || CRYPTO_MD5=m
bool "HMAC-MD5"
select CRYPTO
select CRYPTO_HMAC
select CRYPTO_MD5
help
Enable the use of HMAC-MD5 during association establishment. It is
advised to use either HMAC-MD5 or HMAC-SHA1.
...
...
net/sctp/ssnmap.c
View file @
92ef2cae
...
...
@@ -40,6 +40,7 @@
#include <net/sctp/sctp.h>
#include <net/sctp/sm.h>
#define MAX_KMALLOC_SIZE 131072
/* Storage size needed for map includes 2 headers and then the
* specific needs of in or out streams.
...
...
@@ -56,11 +57,14 @@ static inline size_t sctp_ssnmap_size(__u16 in, __u16 out)
struct
sctp_ssnmap
*
sctp_ssnmap_new
(
__u16
in
,
__u16
out
,
int
gfp
)
{
struct
sctp_ssnmap
*
retval
;
int
order
;
order
=
get_order
(
sctp_ssnmap_size
(
in
,
out
));
retval
=
(
struct
sctp_ssnmap
*
)
__get_free_pages
(
gfp
,
order
);
int
size
;
size
=
sctp_ssnmap_size
(
in
,
out
);
if
(
size
<=
MAX_KMALLOC_SIZE
)
retval
=
kmalloc
(
size
,
gfp
);
else
retval
=
(
struct
sctp_ssnmap
*
)
__get_free_pages
(
gfp
,
get_order
(
size
));
if
(
!
retval
)
goto
fail
;
...
...
@@ -73,7 +77,10 @@ struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out, int gfp)
return
retval
;
fail_map:
free_pages
((
unsigned
long
)
retval
,
order
);
if
(
size
<=
MAX_KMALLOC_SIZE
)
kfree
(
retval
);
else
free_pages
((
unsigned
long
)
retval
,
get_order
(
size
));
fail:
return
NULL
;
}
...
...
@@ -109,9 +116,13 @@ void sctp_ssnmap_clear(struct sctp_ssnmap *map)
void
sctp_ssnmap_free
(
struct
sctp_ssnmap
*
map
)
{
if
(
map
&&
map
->
malloced
)
{
free_pages
((
unsigned
long
)
map
,
get_order
(
sctp_ssnmap_size
(
map
->
in
.
len
,
map
->
out
.
len
)));
int
size
;
size
=
sctp_ssnmap_size
(
map
->
in
.
len
,
map
->
out
.
len
);
if
(
size
<=
MAX_KMALLOC_SIZE
)
kfree
(
map
);
else
free_pages
((
unsigned
long
)
map
,
get_order
(
size
));
SCTP_DBG_OBJCNT_DEC
(
ssnmap
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment