Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
85fadea9
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
85fadea9
编写于
6月 05, 2011
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'pablo/nf-2.6-updates' of
git://1984.lsi.us.es/net-2.6
上级
5fb9fb13
d232b8dd
变更
26
隐藏空白更改
内联
并排
Showing
26 changed file
with
61 addition
and
49 deletion
+61
-49
include/linux/netfilter/nf_conntrack_common.h
include/linux/netfilter/nf_conntrack_common.h
+3
-0
net/ipv4/netfilter/ip_queue.c
net/ipv4/netfilter/ip_queue.c
+2
-1
net/ipv4/netfilter/ipt_CLUSTERIP.c
net/ipv4/netfilter/ipt_CLUSTERIP.c
+3
-3
net/ipv4/netfilter/ipt_MASQUERADE.c
net/ipv4/netfilter/ipt_MASQUERADE.c
+1
-1
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
+1
-1
net/ipv4/netfilter/nf_conntrack_proto_icmp.c
net/ipv4/netfilter/nf_conntrack_proto_icmp.c
+1
-1
net/ipv4/netfilter/nf_nat_core.c
net/ipv4/netfilter/nf_nat_core.c
+1
-1
net/ipv4/netfilter/nf_nat_helper.c
net/ipv4/netfilter/nf_nat_helper.c
+1
-1
net/ipv4/netfilter/nf_nat_rule.c
net/ipv4/netfilter/nf_nat_rule.c
+1
-1
net/ipv4/netfilter/nf_nat_standalone.c
net/ipv4/netfilter/nf_nat_standalone.c
+2
-2
net/ipv6/netfilter/ip6_queue.c
net/ipv6/netfilter/ip6_queue.c
+2
-1
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
+1
-1
net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
+1
-1
net/netfilter/ipset/ip_set_core.c
net/netfilter/ipset/ip_set_core.c
+1
-1
net/netfilter/ipset/ip_set_hash_ipportnet.c
net/netfilter/ipset/ip_set_hash_ipportnet.c
+6
-4
net/netfilter/ipset/ip_set_hash_net.c
net/netfilter/ipset/ip_set_hash_net.c
+6
-2
net/netfilter/ipset/ip_set_hash_netport.c
net/netfilter/ipset/ip_set_hash_netport.c
+4
-2
net/netfilter/ipvs/ip_vs_core.c
net/netfilter/ipvs/ip_vs_core.c
+8
-8
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_core.c
+5
-2
net/netfilter/nf_conntrack_ftp.c
net/netfilter/nf_conntrack_ftp.c
+1
-1
net/netfilter/nf_conntrack_h323_main.c
net/netfilter/nf_conntrack_h323_main.c
+4
-6
net/netfilter/nf_conntrack_irc.c
net/netfilter/nf_conntrack_irc.c
+1
-2
net/netfilter/nf_conntrack_pptp.c
net/netfilter/nf_conntrack_pptp.c
+1
-2
net/netfilter/nf_conntrack_sane.c
net/netfilter/nf_conntrack_sane.c
+1
-1
net/netfilter/nf_conntrack_sip.c
net/netfilter/nf_conntrack_sip.c
+1
-1
net/netfilter/xt_socket.c
net/netfilter/xt_socket.c
+2
-2
未找到文件。
include/linux/netfilter/nf_conntrack_common.h
浏览文件 @
85fadea9
...
...
@@ -18,6 +18,9 @@ enum ip_conntrack_info {
/* >= this indicates reply direction */
IP_CT_IS_REPLY
,
IP_CT_ESTABLISHED_REPLY
=
IP_CT_ESTABLISHED
+
IP_CT_IS_REPLY
,
IP_CT_RELATED_REPLY
=
IP_CT_RELATED
+
IP_CT_IS_REPLY
,
IP_CT_NEW_REPLY
=
IP_CT_NEW
+
IP_CT_IS_REPLY
,
/* Number of distinct IP_CT types (no NEW in reply dirn). */
IP_CT_NUMBER
=
IP_CT_IS_REPLY
*
2
-
1
};
...
...
net/ipv4/netfilter/ip_queue.c
浏览文件 @
85fadea9
...
...
@@ -402,7 +402,8 @@ ipq_dev_drop(int ifindex)
static
inline
void
__ipq_rcv_skb
(
struct
sk_buff
*
skb
)
{
int
status
,
type
,
pid
,
flags
,
nlmsglen
,
skblen
;
int
status
,
type
,
pid
,
flags
;
unsigned
int
nlmsglen
,
skblen
;
struct
nlmsghdr
*
nlh
;
skblen
=
skb
->
len
;
...
...
net/ipv4/netfilter/ipt_CLUSTERIP.c
浏览文件 @
85fadea9
...
...
@@ -307,7 +307,7 @@ clusterip_tg(struct sk_buff *skb, const struct xt_action_param *par)
* error messages (RELATED) and information requests (see below) */
if
(
ip_hdr
(
skb
)
->
protocol
==
IPPROTO_ICMP
&&
(
ctinfo
==
IP_CT_RELATED
||
ctinfo
==
IP_CT_RELATED
+
IP_CT_IS
_REPLY
))
ctinfo
==
IP_CT_RELATED_REPLY
))
return
XT_CONTINUE
;
/* ip_conntrack_icmp guarantees us that we only have ICMP_ECHO,
...
...
@@ -321,12 +321,12 @@ clusterip_tg(struct sk_buff *skb, const struct xt_action_param *par)
ct
->
mark
=
hash
;
break
;
case
IP_CT_RELATED
:
case
IP_CT_RELATED
+
IP_CT_IS
_REPLY
:
case
IP_CT_RELATED_REPLY
:
/* FIXME: we don't handle expectations at the
* moment. they can arrive on a different node than
* the master connection (e.g. FTP passive mode) */
case
IP_CT_ESTABLISHED
:
case
IP_CT_ESTABLISHED
+
IP_CT_IS
_REPLY
:
case
IP_CT_ESTABLISHED_REPLY
:
break
;
default:
break
;
...
...
net/ipv4/netfilter/ipt_MASQUERADE.c
浏览文件 @
85fadea9
...
...
@@ -60,7 +60,7 @@ masquerade_tg(struct sk_buff *skb, const struct xt_action_param *par)
nat
=
nfct_nat
(
ct
);
NF_CT_ASSERT
(
ct
&&
(
ctinfo
==
IP_CT_NEW
||
ctinfo
==
IP_CT_RELATED
||
ctinfo
==
IP_CT_RELATED
+
IP_CT_IS
_REPLY
));
ctinfo
==
IP_CT_RELATED_REPLY
));
/* Source address is 0.0.0.0 - locally generated packet that is
* probably not supposed to be masqueraded.
...
...
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
浏览文件 @
85fadea9
...
...
@@ -101,7 +101,7 @@ static unsigned int ipv4_confirm(unsigned int hooknum,
/* This is where we call the helper: as the packet goes out. */
ct
=
nf_ct_get
(
skb
,
&
ctinfo
);
if
(
!
ct
||
ctinfo
==
IP_CT_RELATED
+
IP_CT_IS
_REPLY
)
if
(
!
ct
||
ctinfo
==
IP_CT_RELATED_REPLY
)
goto
out
;
help
=
nfct_help
(
ct
);
...
...
net/ipv4/netfilter/nf_conntrack_proto_icmp.c
浏览文件 @
85fadea9
...
...
@@ -160,7 +160,7 @@ icmp_error_message(struct net *net, struct nf_conn *tmpl, struct sk_buff *skb,
/* Update skb to refer to this connection */
skb
->
nfct
=
&
nf_ct_tuplehash_to_ctrack
(
h
)
->
ct_general
;
skb
->
nfctinfo
=
*
ctinfo
;
return
-
NF_ACCEPT
;
return
NF_ACCEPT
;
}
/* Small and modified version of icmp_rcv */
...
...
net/ipv4/netfilter/nf_nat_core.c
浏览文件 @
85fadea9
...
...
@@ -433,7 +433,7 @@ int nf_nat_icmp_reply_translation(struct nf_conn *ct,
/* Must be RELATED */
NF_CT_ASSERT
(
skb
->
nfctinfo
==
IP_CT_RELATED
||
skb
->
nfctinfo
==
IP_CT_RELATED
+
IP_CT_IS
_REPLY
);
skb
->
nfctinfo
==
IP_CT_RELATED_REPLY
);
/* Redirects on non-null nats must be dropped, else they'll
start talking to each other without our translation, and be
...
...
net/ipv4/netfilter/nf_nat_helper.c
浏览文件 @
85fadea9
...
...
@@ -160,7 +160,7 @@ static void nf_nat_csum(struct sk_buff *skb, const struct iphdr *iph, void *data
if
(
skb
->
ip_summed
!=
CHECKSUM_PARTIAL
)
{
if
(
!
(
rt
->
rt_flags
&
RTCF_LOCAL
)
&&
skb
->
dev
->
features
&
NETIF_F_V4_CSUM
)
{
(
!
skb
->
dev
||
skb
->
dev
->
features
&
NETIF_F_V4_CSUM
)
)
{
skb
->
ip_summed
=
CHECKSUM_PARTIAL
;
skb
->
csum_start
=
skb_headroom
(
skb
)
+
skb_network_offset
(
skb
)
+
...
...
net/ipv4/netfilter/nf_nat_rule.c
浏览文件 @
85fadea9
...
...
@@ -53,7 +53,7 @@ ipt_snat_target(struct sk_buff *skb, const struct xt_action_param *par)
/* Connection must be valid and new. */
NF_CT_ASSERT
(
ct
&&
(
ctinfo
==
IP_CT_NEW
||
ctinfo
==
IP_CT_RELATED
||
ctinfo
==
IP_CT_RELATED
+
IP_CT_IS
_REPLY
));
ctinfo
==
IP_CT_RELATED_REPLY
));
NF_CT_ASSERT
(
par
->
out
!=
NULL
);
return
nf_nat_setup_info
(
ct
,
&
mr
->
range
[
0
],
IP_NAT_MANIP_SRC
);
...
...
net/ipv4/netfilter/nf_nat_standalone.c
浏览文件 @
85fadea9
...
...
@@ -116,7 +116,7 @@ nf_nat_fn(unsigned int hooknum,
switch
(
ctinfo
)
{
case
IP_CT_RELATED
:
case
IP_CT_RELATED
+
IP_CT_IS
_REPLY
:
case
IP_CT_RELATED_REPLY
:
if
(
ip_hdr
(
skb
)
->
protocol
==
IPPROTO_ICMP
)
{
if
(
!
nf_nat_icmp_reply_translation
(
ct
,
ctinfo
,
hooknum
,
skb
))
...
...
@@ -144,7 +144,7 @@ nf_nat_fn(unsigned int hooknum,
default:
/* ESTABLISHED */
NF_CT_ASSERT
(
ctinfo
==
IP_CT_ESTABLISHED
||
ctinfo
==
(
IP_CT_ESTABLISHED
+
IP_CT_IS_REPLY
)
);
ctinfo
==
IP_CT_ESTABLISHED_REPLY
);
}
return
nf_nat_packet
(
ct
,
ctinfo
,
hooknum
,
skb
);
...
...
net/ipv6/netfilter/ip6_queue.c
浏览文件 @
85fadea9
...
...
@@ -403,7 +403,8 @@ ipq_dev_drop(int ifindex)
static
inline
void
__ipq_rcv_skb
(
struct
sk_buff
*
skb
)
{
int
status
,
type
,
pid
,
flags
,
nlmsglen
,
skblen
;
int
status
,
type
,
pid
,
flags
;
unsigned
int
nlmsglen
,
skblen
;
struct
nlmsghdr
*
nlh
;
skblen
=
skb
->
len
;
...
...
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
浏览文件 @
85fadea9
...
...
@@ -160,7 +160,7 @@ static unsigned int ipv6_confirm(unsigned int hooknum,
/* This is where we call the helper: as the packet goes out. */
ct
=
nf_ct_get
(
skb
,
&
ctinfo
);
if
(
!
ct
||
ctinfo
==
IP_CT_RELATED
+
IP_CT_IS
_REPLY
)
if
(
!
ct
||
ctinfo
==
IP_CT_RELATED_REPLY
)
goto
out
;
help
=
nfct_help
(
ct
);
...
...
net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
浏览文件 @
85fadea9
...
...
@@ -177,7 +177,7 @@ icmpv6_error_message(struct net *net, struct nf_conn *tmpl,
/* Update skb to refer to this connection */
skb
->
nfct
=
&
nf_ct_tuplehash_to_ctrack
(
h
)
->
ct_general
;
skb
->
nfctinfo
=
*
ctinfo
;
return
-
NF_ACCEPT
;
return
NF_ACCEPT
;
}
static
int
...
...
net/netfilter/ipset/ip_set_core.c
浏览文件 @
85fadea9
...
...
@@ -767,7 +767,7 @@ ip_set_destroy(struct sock *ctnl, struct sk_buff *skb,
if
(
!
attr
[
IPSET_ATTR_SETNAME
])
{
for
(
i
=
0
;
i
<
ip_set_max
;
i
++
)
{
if
(
ip_set_list
[
i
]
!=
NULL
&&
ip_set_list
[
i
]
->
ref
)
{
ret
=
IPSET_ERR_BUSY
;
ret
=
-
IPSET_ERR_BUSY
;
goto
out
;
}
}
...
...
net/netfilter/ipset/ip_set_hash_ipportnet.c
浏览文件 @
85fadea9
...
...
@@ -146,8 +146,9 @@ hash_ipportnet4_kadt(struct ip_set *set, const struct sk_buff *skb,
{
const
struct
ip_set_hash
*
h
=
set
->
data
;
ipset_adtfn
adtfn
=
set
->
variant
->
adt
[
adt
];
struct
hash_ipportnet4_elem
data
=
{
.
cidr
=
h
->
nets
[
0
].
cidr
||
HOST_MASK
};
struct
hash_ipportnet4_elem
data
=
{
.
cidr
=
h
->
nets
[
0
].
cidr
?
h
->
nets
[
0
].
cidr
:
HOST_MASK
};
if
(
data
.
cidr
==
0
)
return
-
EINVAL
;
...
...
@@ -394,8 +395,9 @@ hash_ipportnet6_kadt(struct ip_set *set, const struct sk_buff *skb,
{
const
struct
ip_set_hash
*
h
=
set
->
data
;
ipset_adtfn
adtfn
=
set
->
variant
->
adt
[
adt
];
struct
hash_ipportnet6_elem
data
=
{
.
cidr
=
h
->
nets
[
0
].
cidr
||
HOST_MASK
};
struct
hash_ipportnet6_elem
data
=
{
.
cidr
=
h
->
nets
[
0
].
cidr
?
h
->
nets
[
0
].
cidr
:
HOST_MASK
};
if
(
data
.
cidr
==
0
)
return
-
EINVAL
;
...
...
net/netfilter/ipset/ip_set_hash_net.c
浏览文件 @
85fadea9
...
...
@@ -131,7 +131,9 @@ hash_net4_kadt(struct ip_set *set, const struct sk_buff *skb,
{
const
struct
ip_set_hash
*
h
=
set
->
data
;
ipset_adtfn
adtfn
=
set
->
variant
->
adt
[
adt
];
struct
hash_net4_elem
data
=
{
.
cidr
=
h
->
nets
[
0
].
cidr
||
HOST_MASK
};
struct
hash_net4_elem
data
=
{
.
cidr
=
h
->
nets
[
0
].
cidr
?
h
->
nets
[
0
].
cidr
:
HOST_MASK
};
if
(
data
.
cidr
==
0
)
return
-
EINVAL
;
...
...
@@ -296,7 +298,9 @@ hash_net6_kadt(struct ip_set *set, const struct sk_buff *skb,
{
const
struct
ip_set_hash
*
h
=
set
->
data
;
ipset_adtfn
adtfn
=
set
->
variant
->
adt
[
adt
];
struct
hash_net6_elem
data
=
{
.
cidr
=
h
->
nets
[
0
].
cidr
||
HOST_MASK
};
struct
hash_net6_elem
data
=
{
.
cidr
=
h
->
nets
[
0
].
cidr
?
h
->
nets
[
0
].
cidr
:
HOST_MASK
};
if
(
data
.
cidr
==
0
)
return
-
EINVAL
;
...
...
net/netfilter/ipset/ip_set_hash_netport.c
浏览文件 @
85fadea9
...
...
@@ -144,7 +144,8 @@ hash_netport4_kadt(struct ip_set *set, const struct sk_buff *skb,
const
struct
ip_set_hash
*
h
=
set
->
data
;
ipset_adtfn
adtfn
=
set
->
variant
->
adt
[
adt
];
struct
hash_netport4_elem
data
=
{
.
cidr
=
h
->
nets
[
0
].
cidr
||
HOST_MASK
};
.
cidr
=
h
->
nets
[
0
].
cidr
?
h
->
nets
[
0
].
cidr
:
HOST_MASK
};
if
(
data
.
cidr
==
0
)
return
-
EINVAL
;
...
...
@@ -357,7 +358,8 @@ hash_netport6_kadt(struct ip_set *set, const struct sk_buff *skb,
const
struct
ip_set_hash
*
h
=
set
->
data
;
ipset_adtfn
adtfn
=
set
->
variant
->
adt
[
adt
];
struct
hash_netport6_elem
data
=
{
.
cidr
=
h
->
nets
[
0
].
cidr
||
HOST_MASK
};
.
cidr
=
h
->
nets
[
0
].
cidr
?
h
->
nets
[
0
].
cidr
:
HOST_MASK
};
if
(
data
.
cidr
==
0
)
return
-
EINVAL
;
...
...
net/netfilter/ipvs/ip_vs_core.c
浏览文件 @
85fadea9
...
...
@@ -1772,7 +1772,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
.
owner
=
THIS_MODULE
,
.
pf
=
PF_INET
,
.
hooknum
=
NF_INET_LOCAL_IN
,
.
priority
=
99
,
.
priority
=
NF_IP_PRI_NAT_SRC
-
2
,
},
/* After packet filtering, forward packet through VS/DR, VS/TUN,
* or VS/NAT(change destination), so that filtering rules can be
...
...
@@ -1782,7 +1782,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
.
owner
=
THIS_MODULE
,
.
pf
=
PF_INET
,
.
hooknum
=
NF_INET_LOCAL_IN
,
.
priority
=
10
1
,
.
priority
=
NF_IP_PRI_NAT_SRC
-
1
,
},
/* Before ip_vs_in, change source only for VS/NAT */
{
...
...
@@ -1790,7 +1790,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
.
owner
=
THIS_MODULE
,
.
pf
=
PF_INET
,
.
hooknum
=
NF_INET_LOCAL_OUT
,
.
priority
=
-
99
,
.
priority
=
NF_IP_PRI_NAT_DST
+
1
,
},
/* After mangle, schedule and forward local requests */
{
...
...
@@ -1798,7 +1798,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
.
owner
=
THIS_MODULE
,
.
pf
=
PF_INET
,
.
hooknum
=
NF_INET_LOCAL_OUT
,
.
priority
=
-
98
,
.
priority
=
NF_IP_PRI_NAT_DST
+
2
,
},
/* After packet filtering (but before ip_vs_out_icmp), catch icmp
* destined for 0.0.0.0/0, which is for incoming IPVS connections */
...
...
@@ -1824,7 +1824,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
.
owner
=
THIS_MODULE
,
.
pf
=
PF_INET6
,
.
hooknum
=
NF_INET_LOCAL_IN
,
.
priority
=
99
,
.
priority
=
NF_IP6_PRI_NAT_SRC
-
2
,
},
/* After packet filtering, forward packet through VS/DR, VS/TUN,
* or VS/NAT(change destination), so that filtering rules can be
...
...
@@ -1834,7 +1834,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
.
owner
=
THIS_MODULE
,
.
pf
=
PF_INET6
,
.
hooknum
=
NF_INET_LOCAL_IN
,
.
priority
=
10
1
,
.
priority
=
NF_IP6_PRI_NAT_SRC
-
1
,
},
/* Before ip_vs_in, change source only for VS/NAT */
{
...
...
@@ -1842,7 +1842,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
.
owner
=
THIS_MODULE
,
.
pf
=
PF_INET
,
.
hooknum
=
NF_INET_LOCAL_OUT
,
.
priority
=
-
99
,
.
priority
=
NF_IP6_PRI_NAT_DST
+
1
,
},
/* After mangle, schedule and forward local requests */
{
...
...
@@ -1850,7 +1850,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
.
owner
=
THIS_MODULE
,
.
pf
=
PF_INET6
,
.
hooknum
=
NF_INET_LOCAL_OUT
,
.
priority
=
-
98
,
.
priority
=
NF_IP6_PRI_NAT_DST
+
2
,
},
/* After packet filtering (but before ip_vs_out_icmp), catch icmp
* destined for 0.0.0.0/0, which is for incoming IPVS connections */
...
...
net/netfilter/nf_conntrack_core.c
浏览文件 @
85fadea9
...
...
@@ -850,7 +850,7 @@ resolve_normal_ct(struct net *net, struct nf_conn *tmpl,
/* It exists; we have (non-exclusive) reference. */
if
(
NF_CT_DIRECTION
(
h
)
==
IP_CT_DIR_REPLY
)
{
*
ctinfo
=
IP_CT_ESTABLISHED
+
IP_CT_IS
_REPLY
;
*
ctinfo
=
IP_CT_ESTABLISHED_REPLY
;
/* Please set reply bit if this packet OK */
*
set_reply
=
1
;
}
else
{
...
...
@@ -922,6 +922,9 @@ nf_conntrack_in(struct net *net, u_int8_t pf, unsigned int hooknum,
ret
=
-
ret
;
goto
out
;
}
/* ICMP[v6] protocol trackers may assign one conntrack. */
if
(
skb
->
nfct
)
goto
out
;
}
ct
=
resolve_normal_ct
(
net
,
tmpl
,
skb
,
dataoff
,
pf
,
protonum
,
...
...
@@ -1143,7 +1146,7 @@ static void nf_conntrack_attach(struct sk_buff *nskb, struct sk_buff *skb)
/* This ICMP is in reverse direction to the packet which caused it */
ct
=
nf_ct_get
(
skb
,
&
ctinfo
);
if
(
CTINFO2DIR
(
ctinfo
)
==
IP_CT_DIR_ORIGINAL
)
ctinfo
=
IP_CT_RELATED
+
IP_CT_IS
_REPLY
;
ctinfo
=
IP_CT_RELATED_REPLY
;
else
ctinfo
=
IP_CT_RELATED
;
...
...
net/netfilter/nf_conntrack_ftp.c
浏览文件 @
85fadea9
...
...
@@ -368,7 +368,7 @@ static int help(struct sk_buff *skb,
/* Until there's been traffic both ways, don't look in packets. */
if
(
ctinfo
!=
IP_CT_ESTABLISHED
&&
ctinfo
!=
IP_CT_ESTABLISHED
+
IP_CT_IS
_REPLY
)
{
ctinfo
!=
IP_CT_ESTABLISHED_REPLY
)
{
pr_debug
(
"ftp: Conntrackinfo = %u
\n
"
,
ctinfo
);
return
NF_ACCEPT
;
}
...
...
net/netfilter/nf_conntrack_h323_main.c
浏览文件 @
85fadea9
...
...
@@ -571,10 +571,9 @@ static int h245_help(struct sk_buff *skb, unsigned int protoff,
int
ret
;
/* Until there's been traffic both ways, don't look in packets. */
if
(
ctinfo
!=
IP_CT_ESTABLISHED
&&
ctinfo
!=
IP_CT_ESTABLISHED
+
IP_CT_IS_REPLY
)
{
if
(
ctinfo
!=
IP_CT_ESTABLISHED
&&
ctinfo
!=
IP_CT_ESTABLISHED_REPLY
)
return
NF_ACCEPT
;
}
pr_debug
(
"nf_ct_h245: skblen = %u
\n
"
,
skb
->
len
);
spin_lock_bh
(
&
nf_h323_lock
);
...
...
@@ -1125,10 +1124,9 @@ static int q931_help(struct sk_buff *skb, unsigned int protoff,
int
ret
;
/* Until there's been traffic both ways, don't look in packets. */
if
(
ctinfo
!=
IP_CT_ESTABLISHED
&&
ctinfo
!=
IP_CT_ESTABLISHED
+
IP_CT_IS_REPLY
)
{
if
(
ctinfo
!=
IP_CT_ESTABLISHED
&&
ctinfo
!=
IP_CT_ESTABLISHED_REPLY
)
return
NF_ACCEPT
;
}
pr_debug
(
"nf_ct_q931: skblen = %u
\n
"
,
skb
->
len
);
spin_lock_bh
(
&
nf_h323_lock
);
...
...
net/netfilter/nf_conntrack_irc.c
浏览文件 @
85fadea9
...
...
@@ -125,8 +125,7 @@ static int help(struct sk_buff *skb, unsigned int protoff,
return
NF_ACCEPT
;
/* Until there's been traffic both ways, don't look in packets. */
if
(
ctinfo
!=
IP_CT_ESTABLISHED
&&
ctinfo
!=
IP_CT_ESTABLISHED
+
IP_CT_IS_REPLY
)
if
(
ctinfo
!=
IP_CT_ESTABLISHED
&&
ctinfo
!=
IP_CT_ESTABLISHED_REPLY
)
return
NF_ACCEPT
;
/* Not a full tcp header? */
...
...
net/netfilter/nf_conntrack_pptp.c
浏览文件 @
85fadea9
...
...
@@ -519,8 +519,7 @@ conntrack_pptp_help(struct sk_buff *skb, unsigned int protoff,
u_int16_t
msg
;
/* don't do any tracking before tcp handshake complete */
if
(
ctinfo
!=
IP_CT_ESTABLISHED
&&
ctinfo
!=
IP_CT_ESTABLISHED
+
IP_CT_IS_REPLY
)
if
(
ctinfo
!=
IP_CT_ESTABLISHED
&&
ctinfo
!=
IP_CT_ESTABLISHED_REPLY
)
return
NF_ACCEPT
;
nexthdr_off
=
protoff
;
...
...
net/netfilter/nf_conntrack_sane.c
浏览文件 @
85fadea9
...
...
@@ -78,7 +78,7 @@ static int help(struct sk_buff *skb,
ct_sane_info
=
&
nfct_help
(
ct
)
->
help
.
ct_sane_info
;
/* Until there's been traffic both ways, don't look in packets. */
if
(
ctinfo
!=
IP_CT_ESTABLISHED
&&
ctinfo
!=
IP_CT_ESTABLISHED
+
IP_CT_IS
_REPLY
)
ctinfo
!=
IP_CT_ESTABLISHED_REPLY
)
return
NF_ACCEPT
;
/* Not a full tcp header? */
...
...
net/netfilter/nf_conntrack_sip.c
浏览文件 @
85fadea9
...
...
@@ -1423,7 +1423,7 @@ static int sip_help_tcp(struct sk_buff *skb, unsigned int protoff,
typeof
(
nf_nat_sip_seq_adjust_hook
)
nf_nat_sip_seq_adjust
;
if
(
ctinfo
!=
IP_CT_ESTABLISHED
&&
ctinfo
!=
IP_CT_ESTABLISHED
+
IP_CT_IS
_REPLY
)
ctinfo
!=
IP_CT_ESTABLISHED_REPLY
)
return
NF_ACCEPT
;
/* No Data ? */
...
...
net/netfilter/xt_socket.c
浏览文件 @
85fadea9
...
...
@@ -143,9 +143,9 @@ socket_match(const struct sk_buff *skb, struct xt_action_param *par,
ct
=
nf_ct_get
(
skb
,
&
ctinfo
);
if
(
ct
&&
!
nf_ct_is_untracked
(
ct
)
&&
((
iph
->
protocol
!=
IPPROTO_ICMP
&&
ctinfo
==
IP_CT_
IS_REPLY
+
IP_CT_ESTABLISHED
)
||
ctinfo
==
IP_CT_
ESTABLISHED_REPLY
)
||
(
iph
->
protocol
==
IPPROTO_ICMP
&&
ctinfo
==
IP_CT_
IS_REPLY
+
IP_CT_RELATED
))
&&
ctinfo
==
IP_CT_
RELATED_REPLY
))
&&
(
ct
->
status
&
IPS_SRC_NAT_DONE
))
{
daddr
=
ct
->
tuplehash
[
IP_CT_DIR_ORIGINAL
].
tuple
.
src
.
u3
.
ip
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录