Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
0b0dc0f1
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
6
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
0b0dc0f1
编写于
4月 19, 2011
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
上级
0553c891
a8a8a093
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
10 deletion
+30
-10
net/netfilter/ipset/ip_set_bitmap_ipmac.c
net/netfilter/ipset/ip_set_bitmap_ipmac.c
+4
-0
net/netfilter/ipset/ip_set_core.c
net/netfilter/ipset/ip_set_core.c
+10
-8
net/netfilter/xt_set.c
net/netfilter/xt_set.c
+16
-2
未找到文件。
net/netfilter/ipset/ip_set_bitmap_ipmac.c
浏览文件 @
0b0dc0f1
...
...
@@ -343,6 +343,10 @@ bitmap_ipmac_kadt(struct ip_set *set, const struct sk_buff *skb,
ipset_adtfn
adtfn
=
set
->
variant
->
adt
[
adt
];
struct
ipmac
data
;
/* MAC can be src only */
if
(
!
(
flags
&
IPSET_DIM_TWO_SRC
))
return
0
;
data
.
id
=
ntohl
(
ip4addr
(
skb
,
flags
&
IPSET_DIM_ONE_SRC
));
if
(
data
.
id
<
map
->
first_ip
||
data
.
id
>
map
->
last_ip
)
return
-
IPSET_ERR_BITMAP_RANGE
;
...
...
net/netfilter/ipset/ip_set_core.c
浏览文件 @
0b0dc0f1
...
...
@@ -1022,8 +1022,9 @@ ip_set_dump_start(struct sk_buff *skb, struct netlink_callback *cb)
if
(
cb
->
args
[
1
]
>=
ip_set_max
)
goto
out
;
pr_debug
(
"args[0]: %ld args[1]: %ld
\n
"
,
cb
->
args
[
0
],
cb
->
args
[
1
]);
max
=
cb
->
args
[
0
]
==
DUMP_ONE
?
cb
->
args
[
1
]
+
1
:
ip_set_max
;
dump_last:
pr_debug
(
"args[0]: %ld args[1]: %ld
\n
"
,
cb
->
args
[
0
],
cb
->
args
[
1
]);
for
(;
cb
->
args
[
1
]
<
max
;
cb
->
args
[
1
]
++
)
{
index
=
(
ip_set_id_t
)
cb
->
args
[
1
];
set
=
ip_set_list
[
index
];
...
...
@@ -1038,8 +1039,8 @@ ip_set_dump_start(struct sk_buff *skb, struct netlink_callback *cb)
* so that lists (unions of sets) are dumped last.
*/
if
(
cb
->
args
[
0
]
!=
DUMP_ONE
&&
!
((
cb
->
args
[
0
]
==
DUMP_ALL
)
^
(
set
->
type
->
features
&
IPSET_DUMP_LAST
)))
((
cb
->
args
[
0
]
==
DUMP_ALL
)
==
!!
(
set
->
type
->
features
&
IPSET_DUMP_LAST
)))
continue
;
pr_debug
(
"List set: %s
\n
"
,
set
->
name
);
if
(
!
cb
->
args
[
2
])
{
...
...
@@ -1083,6 +1084,12 @@ ip_set_dump_start(struct sk_buff *skb, struct netlink_callback *cb)
goto
release_refcount
;
}
}
/* If we dump all sets, continue with dumping last ones */
if
(
cb
->
args
[
0
]
==
DUMP_ALL
)
{
cb
->
args
[
0
]
=
DUMP_LAST
;
cb
->
args
[
1
]
=
0
;
goto
dump_last
;
}
goto
out
;
nla_put_failure:
...
...
@@ -1093,11 +1100,6 @@ ip_set_dump_start(struct sk_buff *skb, struct netlink_callback *cb)
pr_debug
(
"release set %s
\n
"
,
ip_set_list
[
index
]
->
name
);
ip_set_put_byindex
(
index
);
}
/* If we dump all sets, continue with dumping last ones */
if
(
cb
->
args
[
0
]
==
DUMP_ALL
&&
cb
->
args
[
1
]
>=
max
&&
!
cb
->
args
[
2
])
cb
->
args
[
0
]
=
DUMP_LAST
;
out:
if
(
nlh
)
{
nlmsg_end
(
skb
,
nlh
);
...
...
net/netfilter/xt_set.c
浏览文件 @
0b0dc0f1
...
...
@@ -81,6 +81,7 @@ set_match_v0_checkentry(const struct xt_mtchk_param *par)
if
(
info
->
match_set
.
u
.
flags
[
IPSET_DIM_MAX
-
1
]
!=
0
)
{
pr_warning
(
"Protocol error: set match dimension "
"is over the limit!
\n
"
);
ip_set_nfnl_put
(
info
->
match_set
.
index
);
return
-
ERANGE
;
}
...
...
@@ -135,6 +136,8 @@ set_target_v0_checkentry(const struct xt_tgchk_param *par)
if
(
index
==
IPSET_INVALID_ID
)
{
pr_warning
(
"Cannot find del_set index %u as target
\n
"
,
info
->
del_set
.
index
);
if
(
info
->
add_set
.
index
!=
IPSET_INVALID_ID
)
ip_set_nfnl_put
(
info
->
add_set
.
index
);
return
-
ENOENT
;
}
}
...
...
@@ -142,6 +145,10 @@ set_target_v0_checkentry(const struct xt_tgchk_param *par)
info
->
del_set
.
u
.
flags
[
IPSET_DIM_MAX
-
1
]
!=
0
)
{
pr_warning
(
"Protocol error: SET target dimension "
"is over the limit!
\n
"
);
if
(
info
->
add_set
.
index
!=
IPSET_INVALID_ID
)
ip_set_nfnl_put
(
info
->
add_set
.
index
);
if
(
info
->
del_set
.
index
!=
IPSET_INVALID_ID
)
ip_set_nfnl_put
(
info
->
del_set
.
index
);
return
-
ERANGE
;
}
...
...
@@ -192,6 +199,7 @@ set_match_checkentry(const struct xt_mtchk_param *par)
if
(
info
->
match_set
.
dim
>
IPSET_DIM_MAX
)
{
pr_warning
(
"Protocol error: set match dimension "
"is over the limit!
\n
"
);
ip_set_nfnl_put
(
info
->
match_set
.
index
);
return
-
ERANGE
;
}
...
...
@@ -219,7 +227,7 @@ set_target(struct sk_buff *skb, const struct xt_action_param *par)
if
(
info
->
del_set
.
index
!=
IPSET_INVALID_ID
)
ip_set_del
(
info
->
del_set
.
index
,
skb
,
par
->
family
,
info
->
add
_set
.
dim
,
info
->
del
_set
.
dim
,
info
->
del_set
.
flags
);
return
XT_CONTINUE
;
...
...
@@ -245,13 +253,19 @@ set_target_checkentry(const struct xt_tgchk_param *par)
if
(
index
==
IPSET_INVALID_ID
)
{
pr_warning
(
"Cannot find del_set index %u as target
\n
"
,
info
->
del_set
.
index
);
if
(
info
->
add_set
.
index
!=
IPSET_INVALID_ID
)
ip_set_nfnl_put
(
info
->
add_set
.
index
);
return
-
ENOENT
;
}
}
if
(
info
->
add_set
.
dim
>
IPSET_DIM_MAX
||
info
->
del_set
.
flags
>
IPSET_DIM_MAX
)
{
info
->
del_set
.
dim
>
IPSET_DIM_MAX
)
{
pr_warning
(
"Protocol error: SET target dimension "
"is over the limit!
\n
"
);
if
(
info
->
add_set
.
index
!=
IPSET_INVALID_ID
)
ip_set_nfnl_put
(
info
->
add_set
.
index
);
if
(
info
->
del_set
.
index
!=
IPSET_INVALID_ID
)
ip_set_nfnl_put
(
info
->
del_set
.
index
);
return
-
ERANGE
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录