Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
64758bd7
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
64758bd7
编写于
2月 28, 2008
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'pending' of master.kernel.org:/pub/scm/linux/kernel/git/vxy/lksctp-dev
上级
16e297b3
7e8616d8
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
34 addition
and
24 deletion
+34
-24
include/net/sctp/user.h
include/net/sctp/user.h
+6
-4
net/sctp/auth.c
net/sctp/auth.c
+2
-2
net/sctp/ipv6.c
net/sctp/ipv6.c
+6
-6
net/sctp/protocol.c
net/sctp/protocol.c
+6
-6
net/sctp/socket.c
net/sctp/socket.c
+13
-5
net/sctp/ulpevent.c
net/sctp/ulpevent.c
+1
-1
未找到文件。
include/net/sctp/user.h
浏览文件 @
64758bd7
...
...
@@ -411,6 +411,7 @@ struct sctp_event_subscribe {
__u8
sctp_shutdown_event
;
__u8
sctp_partial_delivery_event
;
__u8
sctp_adaptation_layer_event
;
__u8
sctp_authentication_event
;
};
/*
...
...
@@ -587,7 +588,7 @@ struct sctp_authchunk {
* endpoint requires the peer to use.
*/
struct
sctp_hmacalgo
{
__u
16
shmac_num_idents
;
__u
32
shmac_num_idents
;
__u16
shmac_idents
[];
};
...
...
@@ -600,7 +601,7 @@ struct sctp_hmacalgo {
struct
sctp_authkey
{
sctp_assoc_t
sca_assoc_id
;
__u16
sca_keynumber
;
__u16
sca_keylen
;
__u16
sca_keylen
gth
;
__u8
sca_key
[];
};
...
...
@@ -693,8 +694,9 @@ struct sctp_status {
* the peer requires to be received authenticated only.
*/
struct
sctp_authchunks
{
sctp_assoc_t
gauth_assoc_id
;
uint8_t
gauth_chunks
[];
sctp_assoc_t
gauth_assoc_id
;
__u32
gauth_number_of_chunks
;
uint8_t
gauth_chunks
[];
};
/*
...
...
net/sctp/auth.c
浏览文件 @
64758bd7
...
...
@@ -838,11 +838,11 @@ int sctp_auth_set_key(struct sctp_endpoint *ep,
}
/* Create a new key data based on the info passed in */
key
=
sctp_auth_create_key
(
auth_key
->
sca_keylen
,
GFP_KERNEL
);
key
=
sctp_auth_create_key
(
auth_key
->
sca_keylen
gth
,
GFP_KERNEL
);
if
(
!
key
)
goto
nomem
;
memcpy
(
key
->
data
,
&
auth_key
->
sca_key
[
0
],
auth_key
->
sca_keylen
);
memcpy
(
key
->
data
,
&
auth_key
->
sca_key
[
0
],
auth_key
->
sca_keylen
gth
);
/* If we are replacing, remove the old keys data from the
* key id. If we are adding new key id, add it to the
...
...
net/sctp/ipv6.c
浏览文件 @
64758bd7
...
...
@@ -966,7 +966,7 @@ static struct inet6_protocol sctpv6_protocol = {
.
flags
=
INET6_PROTO_NOPOLICY
|
INET6_PROTO_FINAL
,
};
static
struct
sctp_af
sctp_
ipv6_specific
=
{
static
struct
sctp_af
sctp_
af_inet6
=
{
.
sa_family
=
AF_INET6
,
.
sctp_xmit
=
sctp_v6_xmit
,
.
setsockopt
=
ipv6_setsockopt
,
...
...
@@ -998,7 +998,7 @@ static struct sctp_af sctp_ipv6_specific = {
#endif
};
static
struct
sctp_pf
sctp_pf_inet6
_specific
=
{
static
struct
sctp_pf
sctp_pf_inet6
=
{
.
event_msgname
=
sctp_inet6_event_msgname
,
.
skb_msgname
=
sctp_inet6_skb_msgname
,
.
af_supported
=
sctp_inet6_af_supported
,
...
...
@@ -1008,7 +1008,7 @@ static struct sctp_pf sctp_pf_inet6_specific = {
.
supported_addrs
=
sctp_inet6_supported_addrs
,
.
create_accept_sk
=
sctp_v6_create_accept_sk
,
.
addr_v4map
=
sctp_v6_addr_v4map
,
.
af
=
&
sctp_
ipv6_specific
,
.
af
=
&
sctp_
af_inet6
,
};
/* Initialize IPv6 support and register with socket layer. */
...
...
@@ -1017,10 +1017,10 @@ int sctp_v6_init(void)
int
rc
;
/* Register the SCTP specific PF_INET6 functions. */
sctp_register_pf
(
&
sctp_pf_inet6
_specific
,
PF_INET6
);
sctp_register_pf
(
&
sctp_pf_inet6
,
PF_INET6
);
/* Register the SCTP specific AF_INET6 functions. */
sctp_register_af
(
&
sctp_
ipv6_specific
);
sctp_register_af
(
&
sctp_
af_inet6
);
rc
=
proto_register
(
&
sctpv6_prot
,
1
);
if
(
rc
)
...
...
@@ -1051,7 +1051,7 @@ void sctp_v6_exit(void)
inet6_unregister_protosw
(
&
sctpv6_seqpacket_protosw
);
inet6_unregister_protosw
(
&
sctpv6_stream_protosw
);
proto_unregister
(
&
sctpv6_prot
);
list_del
(
&
sctp_
ipv6_specific
.
list
);
list_del
(
&
sctp_
af_inet6
.
list
);
}
/* Unregister with inet6 layer. */
...
...
net/sctp/protocol.c
浏览文件 @
64758bd7
...
...
@@ -832,7 +832,7 @@ static inline int sctp_v4_xmit(struct sk_buff *skb,
return
ip_queue_xmit
(
skb
,
ipfragok
);
}
static
struct
sctp_af
sctp_
ipv4_specific
;
static
struct
sctp_af
sctp_
af_inet
;
static
struct
sctp_pf
sctp_pf_inet
=
{
.
event_msgname
=
sctp_inet_event_msgname
,
...
...
@@ -844,7 +844,7 @@ static struct sctp_pf sctp_pf_inet = {
.
supported_addrs
=
sctp_inet_supported_addrs
,
.
create_accept_sk
=
sctp_v4_create_accept_sk
,
.
addr_v4map
=
sctp_v4_addr_v4map
,
.
af
=
&
sctp_
ipv4_specific
,
.
af
=
&
sctp_
af_inet
};
/* Notifier for inetaddr addition/deletion events. */
...
...
@@ -906,7 +906,7 @@ static struct net_protocol sctp_protocol = {
};
/* IPv4 address related functions. */
static
struct
sctp_af
sctp_
ipv4_specific
=
{
static
struct
sctp_af
sctp_
af_inet
=
{
.
sa_family
=
AF_INET
,
.
sctp_xmit
=
sctp_v4_xmit
,
.
setsockopt
=
ip_setsockopt
,
...
...
@@ -1192,7 +1192,7 @@ SCTP_STATIC __init int sctp_init(void)
sctp_sysctl_register
();
INIT_LIST_HEAD
(
&
sctp_address_families
);
sctp_register_af
(
&
sctp_
ipv4_specific
);
sctp_register_af
(
&
sctp_
af_inet
);
status
=
proto_register
(
&
sctp_prot
,
1
);
if
(
status
)
...
...
@@ -1249,7 +1249,7 @@ SCTP_STATIC __init int sctp_init(void)
proto_unregister
(
&
sctp_prot
);
err_proto_register:
sctp_sysctl_unregister
();
list_del
(
&
sctp_
ipv4_specific
.
list
);
list_del
(
&
sctp_
af_inet
.
list
);
free_pages
((
unsigned
long
)
sctp_port_hashtable
,
get_order
(
sctp_port_hashsize
*
sizeof
(
struct
sctp_bind_hashbucket
)));
...
...
@@ -1299,7 +1299,7 @@ SCTP_STATIC __exit void sctp_exit(void)
inet_unregister_protosw
(
&
sctp_seqpacket_protosw
);
sctp_sysctl_unregister
();
list_del
(
&
sctp_
ipv4_specific
.
list
);
list_del
(
&
sctp_
af_inet
.
list
);
free_pages
((
unsigned
long
)
sctp_assoc_hashtable
,
get_order
(
sctp_assoc_hashsize
*
...
...
net/sctp/socket.c
浏览文件 @
64758bd7
...
...
@@ -1964,7 +1964,7 @@ static int sctp_setsockopt_disable_fragments(struct sock *sk,
static
int
sctp_setsockopt_events
(
struct
sock
*
sk
,
char
__user
*
optval
,
int
optlen
)
{
if
(
optlen
!=
sizeof
(
struct
sctp_event_subscribe
))
if
(
optlen
>
sizeof
(
struct
sctp_event_subscribe
))
return
-
EINVAL
;
if
(
copy_from_user
(
&
sctp_sk
(
sk
)
->
subscribe
,
optval
,
optlen
))
return
-
EFAULT
;
...
...
@@ -5070,6 +5070,7 @@ static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len,
struct
sctp_authchunks
val
;
struct
sctp_association
*
asoc
;
struct
sctp_chunks_param
*
ch
;
u32
num_chunks
;
char
__user
*
to
;
if
(
len
<=
sizeof
(
struct
sctp_authchunks
))
...
...
@@ -5086,12 +5087,15 @@ static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len,
ch
=
asoc
->
peer
.
peer_chunks
;
/* See if the user provided enough room for all the data */
if
(
len
<
ntohs
(
ch
->
param_hdr
.
length
))
num_chunks
=
ntohs
(
ch
->
param_hdr
.
length
)
-
sizeof
(
sctp_paramhdr_t
);
if
(
len
<
num_chunks
)
return
-
EINVAL
;
len
=
n
tohs
(
ch
->
param_hdr
.
length
)
;
len
=
n
um_chunks
;
if
(
put_user
(
len
,
optlen
))
return
-
EFAULT
;
if
(
put_user
(
num_chunks
,
&
p
->
gauth_number_of_chunks
))
return
-
EFAULT
;
if
(
copy_to_user
(
to
,
ch
->
chunks
,
len
))
return
-
EFAULT
;
...
...
@@ -5105,6 +5109,7 @@ static int sctp_getsockopt_local_auth_chunks(struct sock *sk, int len,
struct
sctp_authchunks
val
;
struct
sctp_association
*
asoc
;
struct
sctp_chunks_param
*
ch
;
u32
num_chunks
;
char
__user
*
to
;
if
(
len
<=
sizeof
(
struct
sctp_authchunks
))
...
...
@@ -5123,12 +5128,15 @@ static int sctp_getsockopt_local_auth_chunks(struct sock *sk, int len,
else
ch
=
sctp_sk
(
sk
)
->
ep
->
auth_chunk_list
;
if
(
len
<
ntohs
(
ch
->
param_hdr
.
length
))
num_chunks
=
ntohs
(
ch
->
param_hdr
.
length
)
-
sizeof
(
sctp_paramhdr_t
);
if
(
len
<
num_chunks
)
return
-
EINVAL
;
len
=
n
tohs
(
ch
->
param_hdr
.
length
)
;
len
=
n
um_chunks
;
if
(
put_user
(
len
,
optlen
))
return
-
EFAULT
;
if
(
put_user
(
num_chunks
,
&
p
->
gauth_number_of_chunks
))
return
-
EFAULT
;
if
(
copy_to_user
(
to
,
ch
->
chunks
,
len
))
return
-
EFAULT
;
...
...
net/sctp/ulpevent.c
浏览文件 @
64758bd7
...
...
@@ -206,7 +206,7 @@ struct sctp_ulpevent *sctp_ulpevent_make_assoc_change(
* This field is the total length of the notification data, including
* the notification header.
*/
sac
->
sac_length
=
s
izeof
(
struct
sctp_assoc_change
)
;
sac
->
sac_length
=
s
kb
->
len
;
/* Socket Extensions for SCTP
* 5.3.1.1 SCTP_ASSOC_CHANGE
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录