Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
3ace95c0
Commit
3ace95c0
authored
Sep 21, 2012
by
Jozsef Kadlecsik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netfilter: ipset: Coding style fixes
Signed-off-by:
Jozsef Kadlecsik
<
kadlec@blackhole.kfki.hu
>
parent
10111a6e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
8 deletions
+12
-8
include/linux/netfilter/ipset/ip_set.h
include/linux/netfilter/ipset/ip_set.h
+3
-2
include/linux/netfilter/ipset/ip_set_ahash.h
include/linux/netfilter/ipset/ip_set_ahash.h
+1
-1
net/netfilter/ipset/ip_set_bitmap_ipmac.c
net/netfilter/ipset/ip_set_bitmap_ipmac.c
+2
-2
net/netfilter/ipset/ip_set_core.c
net/netfilter/ipset/ip_set_core.c
+6
-3
No files found.
include/linux/netfilter/ipset/ip_set.h
View file @
3ace95c0
...
...
@@ -255,7 +255,7 @@ struct ip_set_type_variant {
* returns negative error code,
* zero for no match/success to add/delete
* positive for matching element */
int
(
*
kadt
)(
struct
ip_set
*
set
,
const
struct
sk_buff
*
skb
,
int
(
*
kadt
)(
struct
ip_set
*
set
,
const
struct
sk_buff
*
skb
,
const
struct
xt_action_param
*
par
,
enum
ipset_adt
adt
,
const
struct
ip_set_adt_opt
*
opt
);
...
...
@@ -430,7 +430,8 @@ static inline int nla_put_ipaddr4(struct sk_buff *skb, int type, __be32 ipaddr)
return
ret
;
}
static
inline
int
nla_put_ipaddr6
(
struct
sk_buff
*
skb
,
int
type
,
const
struct
in6_addr
*
ipaddrptr
)
static
inline
int
nla_put_ipaddr6
(
struct
sk_buff
*
skb
,
int
type
,
const
struct
in6_addr
*
ipaddrptr
)
{
struct
nlattr
*
__nested
=
ipset_nest_start
(
skb
,
type
);
int
ret
;
...
...
include/linux/netfilter/ipset/ip_set_ahash.h
View file @
3ace95c0
...
...
@@ -696,7 +696,7 @@ type_pf_list(const struct ip_set *set,
}
static
int
type_pf_kadt
(
struct
ip_set
*
set
,
const
struct
sk_buff
*
skb
,
type_pf_kadt
(
struct
ip_set
*
set
,
const
struct
sk_buff
*
skb
,
const
struct
xt_action_param
*
par
,
enum
ipset_adt
adt
,
const
struct
ip_set_adt_opt
*
opt
);
static
int
...
...
net/netfilter/ipset/ip_set_bitmap_ipmac.c
View file @
3ace95c0
...
...
@@ -323,11 +323,11 @@ bitmap_ipmac_tlist(const struct ip_set *set,
(
elem
->
match
==
MAC_FILLED
&&
nla_put
(
skb
,
IPSET_ATTR_ETHER
,
ETH_ALEN
,
elem
->
ether
)))
goto
nla_put_failure
;
goto
nla_put_failure
;
timeout
=
elem
->
match
==
MAC_UNSET
?
elem
->
timeout
:
ip_set_timeout_get
(
elem
->
timeout
);
if
(
nla_put_net32
(
skb
,
IPSET_ATTR_TIMEOUT
,
htonl
(
timeout
)))
goto
nla_put_failure
;
goto
nla_put_failure
;
ipset_nest_end
(
skb
,
nested
);
}
ipset_nest_end
(
skb
,
atd
);
...
...
net/netfilter/ipset/ip_set_core.c
View file @
3ace95c0
...
...
@@ -69,7 +69,8 @@ find_set_type(const char *name, u8 family, u8 revision)
list_for_each_entry_rcu
(
type
,
&
ip_set_type_list
,
list
)
if
(
STREQ
(
type
->
name
,
name
)
&&
(
type
->
family
==
family
||
type
->
family
==
NFPROTO_UNSPEC
)
&&
(
type
->
family
==
family
||
type
->
family
==
NFPROTO_UNSPEC
)
&&
revision
>=
type
->
revision_min
&&
revision
<=
type
->
revision_max
)
return
type
;
...
...
@@ -149,7 +150,8 @@ __find_set_type_minmax(const char *name, u8 family, u8 *min, u8 *max,
rcu_read_lock
();
list_for_each_entry_rcu
(
type
,
&
ip_set_type_list
,
list
)
if
(
STREQ
(
type
->
name
,
name
)
&&
(
type
->
family
==
family
||
type
->
family
==
NFPROTO_UNSPEC
))
{
(
type
->
family
==
family
||
type
->
family
==
NFPROTO_UNSPEC
))
{
found
=
true
;
if
(
type
->
revision_min
<
*
min
)
*
min
=
type
->
revision_min
;
...
...
@@ -721,7 +723,8 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb,
* by the nfnl mutex. Find the first free index in ip_set_list
* and check clashing.
*/
if
((
ret
=
find_free_id
(
set
->
name
,
&
index
,
&
clash
))
!=
0
)
{
ret
=
find_free_id
(
set
->
name
,
&
index
,
&
clash
);
if
(
ret
!=
0
)
{
/* If this is the same set and requested, ignore error */
if
(
ret
==
-
EEXIST
&&
(
flags
&
IPSET_FLAG_EXIST
)
&&
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment