Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
6e27c9b4
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6e27c9b4
编写于
9月 21, 2012
作者:
J
Jozsef Kadlecsik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
netfilter: ipset: Fix sparse warnings "incorrect type in assignment"
Signed-off-by:
N
Jozsef Kadlecsik
<
kadlec@blackhole.kfki.hu
>
上级
2cbc78a2
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
39 addition
and
33 deletion
+39
-33
net/netfilter/ipset/ip_set_hash_ip.c
net/netfilter/ipset/ip_set_hash_ip.c
+2
-2
net/netfilter/ipset/ip_set_hash_ipport.c
net/netfilter/ipset/ip_set_hash_ipport.c
+7
-6
net/netfilter/ipset/ip_set_hash_ipportip.c
net/netfilter/ipset/ip_set_hash_ipportip.c
+7
-6
net/netfilter/ipset/ip_set_hash_ipportnet.c
net/netfilter/ipset/ip_set_hash_ipportnet.c
+12
-9
net/netfilter/ipset/ip_set_hash_net.c
net/netfilter/ipset/ip_set_hash_net.c
+2
-2
net/netfilter/ipset/ip_set_hash_netiface.c
net/netfilter/ipset/ip_set_hash_netiface.c
+2
-2
net/netfilter/ipset/ip_set_hash_netport.c
net/netfilter/ipset/ip_set_hash_netport.c
+7
-6
未找到文件。
net/netfilter/ipset/ip_set_hash_ip.c
浏览文件 @
6e27c9b4
...
...
@@ -114,7 +114,7 @@ hash_ip4_data_tlist(struct sk_buff *skb, const struct hash_ip4_elem *data)
static
inline
void
hash_ip4_data_next
(
struct
ip_set_hash
*
h
,
const
struct
hash_ip4_elem
*
d
)
{
h
->
next
.
ip
=
ntohl
(
d
->
ip
)
;
h
->
next
.
ip
=
d
->
ip
;
}
static
int
...
...
@@ -188,7 +188,7 @@ hash_ip4_uadt(struct ip_set *set, struct nlattr *tb[],
hosts
=
h
->
netmask
==
32
?
1
:
2
<<
(
32
-
h
->
netmask
-
1
);
if
(
retried
)
ip
=
h
->
next
.
ip
;
ip
=
ntohl
(
h
->
next
.
ip
)
;
for
(;
!
before
(
ip_to
,
ip
);
ip
+=
hosts
)
{
nip
=
htonl
(
ip
);
if
(
nip
==
0
)
...
...
net/netfilter/ipset/ip_set_hash_ipport.c
浏览文件 @
6e27c9b4
...
...
@@ -130,8 +130,8 @@ static inline void
hash_ipport4_data_next
(
struct
ip_set_hash
*
h
,
const
struct
hash_ipport4_elem
*
d
)
{
h
->
next
.
ip
=
ntohl
(
d
->
ip
)
;
h
->
next
.
port
=
ntohs
(
d
->
port
)
;
h
->
next
.
ip
=
d
->
ip
;
h
->
next
.
port
=
d
->
port
;
}
static
int
...
...
@@ -231,9 +231,10 @@ hash_ipport4_uadt(struct ip_set *set, struct nlattr *tb[],
}
if
(
retried
)
ip
=
h
->
next
.
ip
;
ip
=
ntohl
(
h
->
next
.
ip
)
;
for
(;
!
before
(
ip_to
,
ip
);
ip
++
)
{
p
=
retried
&&
ip
==
h
->
next
.
ip
?
h
->
next
.
port
:
port
;
p
=
retried
&&
ip
==
ntohl
(
h
->
next
.
ip
)
?
ntohs
(
h
->
next
.
port
)
:
port
;
for
(;
p
<=
port_to
;
p
++
)
{
data
.
ip
=
htonl
(
ip
);
data
.
port
=
htons
(
p
);
...
...
@@ -349,7 +350,7 @@ static inline void
hash_ipport6_data_next
(
struct
ip_set_hash
*
h
,
const
struct
hash_ipport6_elem
*
d
)
{
h
->
next
.
port
=
ntohs
(
d
->
port
)
;
h
->
next
.
port
=
d
->
port
;
}
static
int
...
...
@@ -431,7 +432,7 @@ hash_ipport6_uadt(struct ip_set *set, struct nlattr *tb[],
swap
(
port
,
port_to
);
if
(
retried
)
port
=
h
->
next
.
port
;
port
=
ntohs
(
h
->
next
.
port
)
;
for
(;
port
<=
port_to
;
port
++
)
{
data
.
port
=
htons
(
port
);
ret
=
adtfn
(
set
,
&
data
,
timeout
,
flags
);
...
...
net/netfilter/ipset/ip_set_hash_ipportip.c
浏览文件 @
6e27c9b4
...
...
@@ -133,8 +133,8 @@ static inline void
hash_ipportip4_data_next
(
struct
ip_set_hash
*
h
,
const
struct
hash_ipportip4_elem
*
d
)
{
h
->
next
.
ip
=
ntohl
(
d
->
ip
)
;
h
->
next
.
port
=
ntohs
(
d
->
port
)
;
h
->
next
.
ip
=
d
->
ip
;
h
->
next
.
port
=
d
->
port
;
}
static
int
...
...
@@ -239,9 +239,10 @@ hash_ipportip4_uadt(struct ip_set *set, struct nlattr *tb[],
}
if
(
retried
)
ip
=
h
->
next
.
ip
;
ip
=
ntohl
(
h
->
next
.
ip
)
;
for
(;
!
before
(
ip_to
,
ip
);
ip
++
)
{
p
=
retried
&&
ip
==
h
->
next
.
ip
?
h
->
next
.
port
:
port
;
p
=
retried
&&
ip
==
ntohl
(
h
->
next
.
ip
)
?
ntohs
(
h
->
next
.
port
)
:
port
;
for
(;
p
<=
port_to
;
p
++
)
{
data
.
ip
=
htonl
(
ip
);
data
.
port
=
htons
(
p
);
...
...
@@ -362,7 +363,7 @@ static inline void
hash_ipportip6_data_next
(
struct
ip_set_hash
*
h
,
const
struct
hash_ipportip6_elem
*
d
)
{
h
->
next
.
port
=
ntohs
(
d
->
port
)
;
h
->
next
.
port
=
d
->
port
;
}
static
int
...
...
@@ -449,7 +450,7 @@ hash_ipportip6_uadt(struct ip_set *set, struct nlattr *tb[],
swap
(
port
,
port_to
);
if
(
retried
)
port
=
h
->
next
.
port
;
port
=
ntohs
(
h
->
next
.
port
)
;
for
(;
port
<=
port_to
;
port
++
)
{
data
.
port
=
htons
(
port
);
ret
=
adtfn
(
set
,
&
data
,
timeout
,
flags
);
...
...
net/netfilter/ipset/ip_set_hash_ipportnet.c
浏览文件 @
6e27c9b4
...
...
@@ -173,9 +173,9 @@ static inline void
hash_ipportnet4_data_next
(
struct
ip_set_hash
*
h
,
const
struct
hash_ipportnet4_elem
*
d
)
{
h
->
next
.
ip
=
ntohl
(
d
->
ip
)
;
h
->
next
.
port
=
ntohs
(
d
->
port
)
;
h
->
next
.
ip2
=
ntohl
(
d
->
ip2
)
;
h
->
next
.
ip
=
d
->
ip
;
h
->
next
.
port
=
d
->
port
;
h
->
next
.
ip2
=
d
->
ip2
;
}
static
int
...
...
@@ -314,14 +314,17 @@ hash_ipportnet4_uadt(struct ip_set *set, struct nlattr *tb[],
}
if
(
retried
)
ip
=
h
->
next
.
ip
;
ip
=
ntohl
(
h
->
next
.
ip
)
;
for
(;
!
before
(
ip_to
,
ip
);
ip
++
)
{
data
.
ip
=
htonl
(
ip
);
p
=
retried
&&
ip
==
h
->
next
.
ip
?
h
->
next
.
port
:
port
;
p
=
retried
&&
ip
==
ntohl
(
h
->
next
.
ip
)
?
ntohs
(
h
->
next
.
port
)
:
port
;
for
(;
p
<=
port_to
;
p
++
)
{
data
.
port
=
htons
(
p
);
ip2
=
retried
&&
ip
==
h
->
next
.
ip
&&
p
==
h
->
next
.
port
?
h
->
next
.
ip2
:
ip2_from
;
ip2
=
retried
&&
ip
==
ntohl
(
h
->
next
.
ip
)
&&
p
==
ntohs
(
h
->
next
.
port
)
?
ntohl
(
h
->
next
.
ip2
)
:
ip2_from
;
while
(
!
after
(
ip2
,
ip2_to
))
{
data
.
ip2
=
htonl
(
ip2
);
ip2_last
=
ip_set_range_to_cidr
(
ip2
,
ip2_to
,
...
...
@@ -486,7 +489,7 @@ static inline void
hash_ipportnet6_data_next
(
struct
ip_set_hash
*
h
,
const
struct
hash_ipportnet6_elem
*
d
)
{
h
->
next
.
port
=
ntohs
(
d
->
port
)
;
h
->
next
.
port
=
d
->
port
;
}
static
int
...
...
@@ -598,7 +601,7 @@ hash_ipportnet6_uadt(struct ip_set *set, struct nlattr *tb[],
swap
(
port
,
port_to
);
if
(
retried
)
port
=
h
->
next
.
port
;
port
=
ntohs
(
h
->
next
.
port
)
;
for
(;
port
<=
port_to
;
port
++
)
{
data
.
port
=
htons
(
port
);
ret
=
adtfn
(
set
,
&
data
,
timeout
,
flags
);
...
...
net/netfilter/ipset/ip_set_hash_net.c
浏览文件 @
6e27c9b4
...
...
@@ -152,7 +152,7 @@ static inline void
hash_net4_data_next
(
struct
ip_set_hash
*
h
,
const
struct
hash_net4_elem
*
d
)
{
h
->
next
.
ip
=
ntohl
(
d
->
ip
)
;
h
->
next
.
ip
=
d
->
ip
;
}
static
int
...
...
@@ -235,7 +235,7 @@ hash_net4_uadt(struct ip_set *set, struct nlattr *tb[],
return
-
IPSET_ERR_HASH_RANGE
;
}
if
(
retried
)
ip
=
h
->
next
.
ip
;
ip
=
ntohl
(
h
->
next
.
ip
)
;
while
(
!
after
(
ip
,
ip_to
))
{
data
.
ip
=
htonl
(
ip
);
last
=
ip_set_range_to_cidr
(
ip
,
ip_to
,
&
data
.
cidr
);
...
...
net/netfilter/ipset/ip_set_hash_netiface.c
浏览文件 @
6e27c9b4
...
...
@@ -277,7 +277,7 @@ static inline void
hash_netiface4_data_next
(
struct
ip_set_hash
*
h
,
const
struct
hash_netiface4_elem
*
d
)
{
h
->
next
.
ip
=
ntohl
(
d
->
ip
)
;
h
->
next
.
ip
=
d
->
ip
;
}
static
int
...
...
@@ -409,7 +409,7 @@ hash_netiface4_uadt(struct ip_set *set, struct nlattr *tb[],
}
if
(
retried
)
ip
=
h
->
next
.
ip
;
ip
=
ntohl
(
h
->
next
.
ip
)
;
while
(
!
after
(
ip
,
ip_to
))
{
data
.
ip
=
htonl
(
ip
);
last
=
ip_set_range_to_cidr
(
ip
,
ip_to
,
&
data
.
cidr
);
...
...
net/netfilter/ipset/ip_set_hash_netport.c
浏览文件 @
6e27c9b4
...
...
@@ -171,8 +171,8 @@ static inline void
hash_netport4_data_next
(
struct
ip_set_hash
*
h
,
const
struct
hash_netport4_elem
*
d
)
{
h
->
next
.
ip
=
ntohl
(
d
->
ip
)
;
h
->
next
.
port
=
ntohs
(
d
->
port
)
;
h
->
next
.
ip
=
d
->
ip
;
h
->
next
.
port
=
d
->
port
;
}
static
int
...
...
@@ -289,12 +289,13 @@ hash_netport4_uadt(struct ip_set *set, struct nlattr *tb[],
}
if
(
retried
)
ip
=
h
->
next
.
ip
;
ip
=
ntohl
(
h
->
next
.
ip
)
;
while
(
!
after
(
ip
,
ip_to
))
{
data
.
ip
=
htonl
(
ip
);
last
=
ip_set_range_to_cidr
(
ip
,
ip_to
,
&
cidr
);
data
.
cidr
=
cidr
-
1
;
p
=
retried
&&
ip
==
h
->
next
.
ip
?
h
->
next
.
port
:
port
;
p
=
retried
&&
ip
==
ntohl
(
h
->
next
.
ip
)
?
ntohs
(
h
->
next
.
port
)
:
port
;
for
(;
p
<=
port_to
;
p
++
)
{
data
.
port
=
htons
(
p
);
ret
=
adtfn
(
set
,
&
data
,
timeout
,
flags
);
...
...
@@ -450,7 +451,7 @@ static inline void
hash_netport6_data_next
(
struct
ip_set_hash
*
h
,
const
struct
hash_netport6_elem
*
d
)
{
h
->
next
.
port
=
ntohs
(
d
->
port
)
;
h
->
next
.
port
=
d
->
port
;
}
static
int
...
...
@@ -554,7 +555,7 @@ hash_netport6_uadt(struct ip_set *set, struct nlattr *tb[],
swap
(
port
,
port_to
);
if
(
retried
)
port
=
h
->
next
.
port
;
port
=
ntohs
(
h
->
next
.
port
)
;
for
(;
port
<=
port_to
;
port
++
)
{
data
.
port
=
htons
(
port
);
ret
=
adtfn
(
set
,
&
data
,
timeout
,
flags
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录