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
134ffb4c
Commit
134ffb4c
authored
Apr 16, 2009
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
parents
2238aff5
98d500d6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
+8
-2
include/net/netfilter/nf_nat.h
include/net/netfilter/nf_nat.h
+1
-0
net/ipv4/netfilter/nf_nat_core.c
net/ipv4/netfilter/nf_nat_core.c
+2
-1
net/netfilter/nf_conntrack_helper.c
net/netfilter/nf_conntrack_helper.c
+1
-1
net/netfilter/nf_log.c
net/netfilter/nf_log.c
+4
-0
No files found.
include/net/netfilter/nf_nat.h
View file @
134ffb4c
...
...
@@ -18,6 +18,7 @@ enum nf_nat_manip_type
#define IP_NAT_RANGE_MAP_IPS 1
#define IP_NAT_RANGE_PROTO_SPECIFIED 2
#define IP_NAT_RANGE_PROTO_RANDOM 4
#define IP_NAT_RANGE_PERSISTENT 8
/* NAT sequence number modifications */
struct
nf_nat_seq
{
...
...
net/ipv4/netfilter/nf_nat_core.c
View file @
134ffb4c
...
...
@@ -211,7 +211,8 @@ find_best_ips_proto(struct nf_conntrack_tuple *tuple,
minip
=
ntohl
(
range
->
min_ip
);
maxip
=
ntohl
(
range
->
max_ip
);
j
=
jhash_2words
((
__force
u32
)
tuple
->
src
.
u3
.
ip
,
(
__force
u32
)
tuple
->
dst
.
u3
.
ip
,
0
);
range
->
flags
&
IP_NAT_RANGE_PERSISTENT
?
(
__force
u32
)
tuple
->
dst
.
u3
.
ip
:
0
,
0
);
j
=
((
u64
)
j
*
(
maxip
-
minip
+
1
))
>>
32
;
*
var_ipp
=
htonl
(
minip
+
j
);
}
...
...
net/netfilter/nf_conntrack_helper.c
View file @
134ffb4c
...
...
@@ -176,7 +176,7 @@ static void __nf_conntrack_helper_unregister(struct nf_conntrack_helper *me,
}
/* Get rid of expecteds, set helpers to NULL. */
hlist_for_each_entry
(
h
,
nn
,
&
net
->
ct
.
unconfirmed
,
hnnode
)
hlist_
nulls_
for_each_entry
(
h
,
nn
,
&
net
->
ct
.
unconfirmed
,
hnnode
)
unhelp
(
h
,
me
);
for
(
i
=
0
;
i
<
nf_conntrack_htable_size
;
i
++
)
{
hlist_nulls_for_each_entry
(
h
,
nn
,
&
net
->
ct
.
hash
[
i
],
hnnode
)
...
...
net/netfilter/nf_log.c
View file @
134ffb4c
...
...
@@ -36,10 +36,14 @@ static struct nf_logger *__find_logger(int pf, const char *str_logger)
int
nf_log_register
(
u_int8_t
pf
,
struct
nf_logger
*
logger
)
{
const
struct
nf_logger
*
llog
;
int
i
;
if
(
pf
>=
ARRAY_SIZE
(
nf_loggers
))
return
-
EINVAL
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
logger
->
list
);
i
++
)
INIT_LIST_HEAD
(
&
logger
->
list
[
i
]);
mutex_lock
(
&
nf_log_mutex
);
if
(
pf
==
NFPROTO_UNSPEC
)
{
...
...
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