Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
deda4987
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,发现更多精彩内容 >>
提交
deda4987
编写于
12月 01, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
上级
ca98f825
ea86575e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
47 addition
and
20 deletion
+47
-20
net/ipv4/fib_frontend.c
net/ipv4/fib_frontend.c
+6
-2
net/ipv4/netfilter/ip_conntrack_proto_tcp.c
net/ipv4/netfilter/ip_conntrack_proto_tcp.c
+20
-9
net/ipv4/netfilter/ipt_recent.c
net/ipv4/netfilter/ipt_recent.c
+1
-0
net/netfilter/nf_conntrack_proto_tcp.c
net/netfilter/nf_conntrack_proto_tcp.c
+20
-9
未找到文件。
net/ipv4/fib_frontend.c
浏览文件 @
deda4987
...
...
@@ -544,12 +544,16 @@ static void nl_fib_input(struct sock *sk, int len)
struct
sk_buff
*
skb
=
NULL
;
struct
nlmsghdr
*
nlh
=
NULL
;
struct
fib_result_nl
*
frn
;
int
err
;
u32
pid
;
struct
fib_table
*
tb
;
skb
=
skb_
recv_datagram
(
sk
,
0
,
0
,
&
err
);
skb
=
skb_
dequeue
(
&
sk
->
sk_receive_queue
);
nlh
=
(
struct
nlmsghdr
*
)
skb
->
data
;
if
(
skb
->
len
<
NLMSG_SPACE
(
0
)
||
skb
->
len
<
nlh
->
nlmsg_len
||
nlh
->
nlmsg_len
<
NLMSG_LENGTH
(
sizeof
(
*
frn
)))
{
kfree_skb
(
skb
);
return
;
}
frn
=
(
struct
fib_result_nl
*
)
NLMSG_DATA
(
nlh
);
tb
=
fib_get_table
(
frn
->
tb_id_in
);
...
...
net/ipv4/netfilter/ip_conntrack_proto_tcp.c
浏览文件 @
deda4987
...
...
@@ -272,9 +272,9 @@ static const enum tcp_conntrack tcp_conntracks[2][6][TCP_CONNTRACK_MAX] = {
* sCL -> sCL
*/
/* sNO, sSS, sSR, sES, sFW, sCW, sLA, sTW, sCL, sLI */
/*ack*/
{
sIV
,
sI
V
,
sSR
,
sES
,
sCW
,
sCW
,
sTW
,
sTW
,
sCL
,
sIV
},
/*ack*/
{
sIV
,
sI
G
,
sSR
,
sES
,
sCW
,
sCW
,
sTW
,
sTW
,
sCL
,
sIV
},
/*
* sSS -> sI
V
Might be a half-open connection.
* sSS -> sI
G
Might be a half-open connection.
* sSR -> sSR Might answer late resent SYN.
* sES -> sES :-)
* sFW -> sCW Normal close request answered by ACK.
...
...
@@ -917,8 +917,12 @@ static int tcp_packet(struct ip_conntrack *conntrack,
switch
(
new_state
)
{
case
TCP_CONNTRACK_IGNORE
:
/* Either SYN in ORIGINAL
* or SYN/ACK in REPLY. */
/* Ignored packets:
*
* a) SYN in ORIGINAL
* b) SYN/ACK in REPLY
* c) ACK in reply direction after initial SYN in original.
*/
if
(
index
==
TCP_SYNACK_SET
&&
conntrack
->
proto
.
tcp
.
last_index
==
TCP_SYN_SET
&&
conntrack
->
proto
.
tcp
.
last_dir
!=
dir
...
...
@@ -985,13 +989,20 @@ static int tcp_packet(struct ip_conntrack *conntrack,
}
case
TCP_CONNTRACK_CLOSE
:
if
(
index
==
TCP_RST_SET
&&
test_bit
(
IPS_SEEN_REPLY_BIT
,
&
conntrack
->
status
)
&&
conntrack
->
proto
.
tcp
.
last_index
==
TCP_SYN_SET
&&
((
test_bit
(
IPS_SEEN_REPLY_BIT
,
&
conntrack
->
status
)
&&
conntrack
->
proto
.
tcp
.
last_index
==
TCP_SYN_SET
)
||
(
!
test_bit
(
IPS_ASSURED_BIT
,
&
conntrack
->
status
)
&&
conntrack
->
proto
.
tcp
.
last_index
==
TCP_ACK_SET
))
&&
ntohl
(
th
->
ack_seq
)
==
conntrack
->
proto
.
tcp
.
last_end
)
{
/* RST sent to invalid SYN we had let trough
* SYN was in window then, tear down connection.
/* RST sent to invalid SYN or ACK we had let trough
* at a) and c) above:
*
* a) SYN was in window then
* c) we hold a half-open connection.
*
* Delete our connection entry.
* We skip window checking, because packet might ACK
* segments we ignored
in the SYN
. */
* segments we ignored. */
goto
in_window
;
}
/* Just fall trough */
...
...
net/ipv4/netfilter/ipt_recent.c
浏览文件 @
deda4987
...
...
@@ -532,6 +532,7 @@ match(const struct sk_buff *skb,
}
if
(
info
->
seconds
&&
info
->
hit_count
)
{
for
(
pkt_count
=
0
,
hits_found
=
0
;
pkt_count
<
ip_pkt_list_tot
;
pkt_count
++
)
{
if
(
r_list
[
location
].
last_pkts
[
pkt_count
]
==
0
)
break
;
if
(
time_before_eq
(
now
,
r_list
[
location
].
last_pkts
[
pkt_count
]
+
info
->
seconds
*
HZ
))
hits_found
++
;
}
if
(
hits_found
>=
info
->
hit_count
)
ans
=
!
info
->
invert
;
else
ans
=
info
->
invert
;
...
...
net/netfilter/nf_conntrack_proto_tcp.c
浏览文件 @
deda4987
...
...
@@ -280,9 +280,9 @@ static enum tcp_conntrack tcp_conntracks[2][6][TCP_CONNTRACK_MAX] = {
* sCL -> sCL
*/
/* sNO, sSS, sSR, sES, sFW, sCW, sLA, sTW, sCL, sLI */
/*ack*/
{
sIV
,
sI
V
,
sSR
,
sES
,
sCW
,
sCW
,
sTW
,
sTW
,
sCL
,
sIV
},
/*ack*/
{
sIV
,
sI
G
,
sSR
,
sES
,
sCW
,
sCW
,
sTW
,
sTW
,
sCL
,
sIV
},
/*
* sSS -> sI
V
Might be a half-open connection.
* sSS -> sI
G
Might be a half-open connection.
* sSR -> sSR Might answer late resent SYN.
* sES -> sES :-)
* sFW -> sCW Normal close request answered by ACK.
...
...
@@ -912,8 +912,12 @@ static int tcp_packet(struct nf_conn *conntrack,
switch
(
new_state
)
{
case
TCP_CONNTRACK_IGNORE
:
/* Either SYN in ORIGINAL
* or SYN/ACK in REPLY. */
/* Ignored packets:
*
* a) SYN in ORIGINAL
* b) SYN/ACK in REPLY
* c) ACK in reply direction after initial SYN in original.
*/
if
(
index
==
TCP_SYNACK_SET
&&
conntrack
->
proto
.
tcp
.
last_index
==
TCP_SYN_SET
&&
conntrack
->
proto
.
tcp
.
last_dir
!=
dir
...
...
@@ -979,13 +983,20 @@ static int tcp_packet(struct nf_conn *conntrack,
}
case
TCP_CONNTRACK_CLOSE
:
if
(
index
==
TCP_RST_SET
&&
test_bit
(
IPS_SEEN_REPLY_BIT
,
&
conntrack
->
status
)
&&
conntrack
->
proto
.
tcp
.
last_index
==
TCP_SYN_SET
&&
((
test_bit
(
IPS_SEEN_REPLY_BIT
,
&
conntrack
->
status
)
&&
conntrack
->
proto
.
tcp
.
last_index
==
TCP_SYN_SET
)
||
(
!
test_bit
(
IPS_ASSURED_BIT
,
&
conntrack
->
status
)
&&
conntrack
->
proto
.
tcp
.
last_index
==
TCP_ACK_SET
))
&&
ntohl
(
th
->
ack_seq
)
==
conntrack
->
proto
.
tcp
.
last_end
)
{
/* RST sent to invalid SYN we had let trough
* SYN was in window then, tear down connection.
/* RST sent to invalid SYN or ACK we had let trough
* at a) and c) above:
*
* a) SYN was in window then
* c) we hold a half-open connection.
*
* Delete our connection entry.
* We skip window checking, because packet might ACK
* segments we ignored
in the SYN
. */
* segments we ignored. */
goto
in_window
;
}
/* Just fall trough */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录