Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
9d288dff
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9d288dff
编写于
2月 11, 2010
作者:
P
Patrick McHardy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
netfilter: nf_conntrack_sip: add T.38 FAX support
Signed-off-by:
N
Patrick McHardy
<
kaber@trash.net
>
上级
48f8ac26
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
6 deletion
+25
-6
include/linux/netfilter/nf_conntrack_sip.h
include/linux/netfilter/nf_conntrack_sip.h
+1
-0
include/net/netfilter/nf_conntrack.h
include/net/netfilter/nf_conntrack.h
+1
-1
net/netfilter/nf_conntrack_sip.c
net/netfilter/nf_conntrack_sip.c
+23
-5
未找到文件。
include/linux/netfilter/nf_conntrack_sip.h
浏览文件 @
9d288dff
...
...
@@ -14,6 +14,7 @@ enum sip_expectation_classes {
SIP_EXPECT_SIGNALLING
,
SIP_EXPECT_AUDIO
,
SIP_EXPECT_VIDEO
,
SIP_EXPECT_IMAGE
,
__SIP_EXPECT_MAX
};
#define SIP_EXPECT_MAX (__SIP_EXPECT_MAX - 1)
...
...
include/net/netfilter/nf_conntrack.h
浏览文件 @
9d288dff
...
...
@@ -70,7 +70,7 @@ union nf_conntrack_help {
struct
nf_conntrack_helper
;
/* Must be kept in sync with the classes defined by helpers */
#define NF_CT_MAX_EXPECT_CLASSES
3
#define NF_CT_MAX_EXPECT_CLASSES
4
/* nf_conn feature for connections that have a helper */
struct
nf_conn_help
{
...
...
net/netfilter/nf_conntrack_sip.c
浏览文件 @
9d288dff
...
...
@@ -907,6 +907,7 @@ static int set_expected_rtp_rtcp(struct sk_buff *skb, unsigned int dataoff,
static
const
struct
sdp_media_type
sdp_media_types
[]
=
{
SDP_MEDIA_TYPE
(
"audio "
,
SIP_EXPECT_AUDIO
),
SDP_MEDIA_TYPE
(
"video "
,
SIP_EXPECT_VIDEO
),
SDP_MEDIA_TYPE
(
"image "
,
SIP_EXPECT_IMAGE
),
};
static
const
struct
sdp_media_type
*
sdp_media_type
(
const
char
*
dptr
,
...
...
@@ -932,7 +933,6 @@ static int process_sdp(struct sk_buff *skb, unsigned int dataoff,
{
enum
ip_conntrack_info
ctinfo
;
struct
nf_conn
*
ct
=
nf_ct_get
(
skb
,
&
ctinfo
);
struct
nf_conn_help
*
help
=
nfct_help
(
ct
);
unsigned
int
matchoff
,
matchlen
;
unsigned
int
mediaoff
,
medialen
;
unsigned
int
sdpoff
;
...
...
@@ -1024,9 +1024,6 @@ static int process_sdp(struct sk_buff *skb, unsigned int dataoff,
ret
=
nf_nat_sdp_session
(
skb
,
dataoff
,
dptr
,
datalen
,
sdpoff
,
&
rtp_addr
);
if
(
ret
==
NF_ACCEPT
&&
i
>
0
)
help
->
help
.
ct_sip_info
.
invite_cseq
=
cseq
;
return
ret
;
}
static
int
process_invite_response
(
struct
sk_buff
*
skb
,
unsigned
int
dataoff
,
...
...
@@ -1077,6 +1074,22 @@ static int process_prack_response(struct sk_buff *skb, unsigned int dataoff,
return
NF_ACCEPT
;
}
static
int
process_invite_request
(
struct
sk_buff
*
skb
,
unsigned
int
dataoff
,
const
char
**
dptr
,
unsigned
int
*
datalen
,
unsigned
int
cseq
)
{
enum
ip_conntrack_info
ctinfo
;
struct
nf_conn
*
ct
=
nf_ct_get
(
skb
,
&
ctinfo
);
struct
nf_conn_help
*
help
=
nfct_help
(
ct
);
unsigned
int
ret
;
flush_expectations
(
ct
,
true
);
ret
=
process_sdp
(
skb
,
dataoff
,
dptr
,
datalen
,
cseq
);
if
(
ret
==
NF_ACCEPT
)
help
->
help
.
ct_sip_info
.
invite_cseq
=
cseq
;
return
ret
;
}
static
int
process_bye_request
(
struct
sk_buff
*
skb
,
unsigned
int
dataoff
,
const
char
**
dptr
,
unsigned
int
*
datalen
,
unsigned
int
cseq
)
...
...
@@ -1257,7 +1270,7 @@ static int process_register_response(struct sk_buff *skb, unsigned int dataoff,
}
static
const
struct
sip_handler
sip_handlers
[]
=
{
SIP_HANDLER
(
"INVITE"
,
process_
sdp
,
process_invite_response
),
SIP_HANDLER
(
"INVITE"
,
process_
invite_request
,
process_invite_response
),
SIP_HANDLER
(
"UPDATE"
,
process_sdp
,
process_update_response
),
SIP_HANDLER
(
"ACK"
,
process_sdp
,
NULL
),
SIP_HANDLER
(
"PRACK"
,
process_sdp
,
process_prack_response
),
...
...
@@ -1473,6 +1486,11 @@ static const struct nf_conntrack_expect_policy sip_exp_policy[SIP_EXPECT_MAX + 1
.
max_expected
=
2
*
IP_CT_DIR_MAX
,
.
timeout
=
3
*
60
,
},
[
SIP_EXPECT_IMAGE
]
=
{
.
name
=
"image"
,
.
max_expected
=
IP_CT_DIR_MAX
,
.
timeout
=
3
*
60
,
},
};
static
void
nf_conntrack_sip_fini
(
void
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录