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
Kirill Smelkov
linux
Commits
c79b9e49
Commit
c79b9e49
authored
Jan 31, 2011
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-next-2.6
parents
b8dad61c
6a4ddef2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
13 deletions
+35
-13
net/netfilter/ipvs/ip_vs_core.c
net/netfilter/ipvs/ip_vs_core.c
+1
-3
net/netfilter/ipvs/ip_vs_ctl.c
net/netfilter/ipvs/ip_vs_ctl.c
+5
-1
net/netfilter/ipvs/ip_vs_proto.c
net/netfilter/ipvs/ip_vs_proto.c
+4
-0
net/netfilter/ipvs/ip_vs_sync.c
net/netfilter/ipvs/ip_vs_sync.c
+2
-2
net/netfilter/xt_connlimit.c
net/netfilter/xt_connlimit.c
+8
-4
net/netfilter/xt_iprange.c
net/netfilter/xt_iprange.c
+15
-3
No files found.
net/netfilter/ipvs/ip_vs_core.c
View file @
c79b9e49
...
...
@@ -1894,9 +1894,7 @@ static int __net_init __ip_vs_init(struct net *net)
static
void
__net_exit
__ip_vs_cleanup
(
struct
net
*
net
)
{
struct
netns_ipvs
*
ipvs
=
net_ipvs
(
net
);
IP_VS_DBG
(
10
,
"ipvs netns %d released
\n
"
,
ipvs
->
gen
);
IP_VS_DBG
(
10
,
"ipvs netns %d released
\n
"
,
net_ipvs
(
net
)
->
gen
);
}
static
struct
pernet_operations
ipvs_core_ops
=
{
...
...
net/netfilter/ipvs/ip_vs_ctl.c
View file @
c79b9e49
...
...
@@ -2062,7 +2062,9 @@ static const struct file_operations ip_vs_stats_percpu_fops = {
*/
static
int
ip_vs_set_timeout
(
struct
net
*
net
,
struct
ip_vs_timeout_user
*
u
)
{
#if defined(CONFIG_IP_VS_PROTO_TCP) || defined(CONFIG_IP_VS_PROTO_UDP)
struct
ip_vs_proto_data
*
pd
;
#endif
IP_VS_DBG
(
2
,
"Setting timeout tcp:%d tcpfin:%d udp:%d
\n
"
,
u
->
tcp_timeout
,
...
...
@@ -2405,7 +2407,9 @@ __ip_vs_get_dest_entries(struct net *net, const struct ip_vs_get_dests *get,
static
inline
void
__ip_vs_get_timeouts
(
struct
net
*
net
,
struct
ip_vs_timeout_user
*
u
)
{
#if defined(CONFIG_IP_VS_PROTO_TCP) || defined(CONFIG_IP_VS_PROTO_UDP)
struct
ip_vs_proto_data
*
pd
;
#endif
#ifdef CONFIG_IP_VS_PROTO_TCP
pd
=
ip_vs_proto_data_get
(
net
,
IPPROTO_TCP
);
...
...
@@ -3552,7 +3556,7 @@ int __net_init __ip_vs_control_init(struct net *net)
ipvs
->
sysctl_hdr
=
register_net_sysctl_table
(
net
,
net_vs_ctl_path
,
vs_vars
);
tbl
);
if
(
ipvs
->
sysctl_hdr
==
NULL
)
goto
err_reg
;
ip_vs_new_estimator
(
net
,
ipvs
->
tot_stats
);
...
...
net/netfilter/ipvs/ip_vs_proto.c
View file @
c79b9e49
...
...
@@ -60,6 +60,9 @@ static int __used __init register_ip_vs_protocol(struct ip_vs_protocol *pp)
return
0
;
}
#if defined(CONFIG_IP_VS_PROTO_TCP) || defined(CONFIG_IP_VS_PROTO_UDP) || \
defined(CONFIG_IP_VS_PROTO_SCTP) || defined(CONFIG_IP_VS_PROTO_AH) || \
defined(CONFIG_IP_VS_PROTO_ESP)
/*
* register an ipvs protocols netns related data
*/
...
...
@@ -85,6 +88,7 @@ register_ip_vs_proto_netns(struct net *net, struct ip_vs_protocol *pp)
return
0
;
}
#endif
/*
* unregister an ipvs protocol
...
...
net/netfilter/ipvs/ip_vs_sync.c
View file @
c79b9e49
...
...
@@ -1305,7 +1305,7 @@ static struct socket *make_send_sock(struct net *net)
int
result
;
/* First create a socket */
result
=
sock_create_kern
(
PF_INET
,
SOCK_DGRAM
,
IPPROTO_UDP
,
&
sock
);
result
=
__sock_create
(
net
,
PF_INET
,
SOCK_DGRAM
,
IPPROTO_UDP
,
&
sock
,
1
);
if
(
result
<
0
)
{
pr_err
(
"Error during creation of socket; terminating
\n
"
);
return
ERR_PTR
(
result
);
...
...
@@ -1351,7 +1351,7 @@ static struct socket *make_receive_sock(struct net *net)
int
result
;
/* First create a socket */
result
=
sock_create_kern
(
PF_INET
,
SOCK_DGRAM
,
IPPROTO_UDP
,
&
sock
);
result
=
__sock_create
(
net
,
PF_INET
,
SOCK_DGRAM
,
IPPROTO_UDP
,
&
sock
,
1
);
if
(
result
<
0
)
{
pr_err
(
"Error during creation of socket; terminating
\n
"
);
return
ERR_PTR
(
result
);
...
...
net/netfilter/xt_connlimit.c
View file @
c79b9e49
...
...
@@ -185,11 +185,15 @@ connlimit_mt(const struct sk_buff *skb, struct xt_action_param *par)
int
connections
;
ct
=
nf_ct_get
(
skb
,
&
ctinfo
);
if
(
ct
!=
NULL
)
tuple_ptr
=
&
ct
->
tuplehash
[
0
].
tuple
;
else
if
(
!
nf_ct_get_tuplepr
(
skb
,
skb_network_offset
(
skb
),
par
->
family
,
&
tuple
))
if
(
ct
!=
NULL
)
{
if
(
info
->
flags
&
XT_CONNLIMIT_DADDR
)
tuple_ptr
=
&
ct
->
tuplehash
[
IP_CT_DIR_REPLY
].
tuple
;
else
tuple_ptr
=
&
ct
->
tuplehash
[
IP_CT_DIR_ORIGINAL
].
tuple
;
}
else
if
(
!
nf_ct_get_tuplepr
(
skb
,
skb_network_offset
(
skb
),
par
->
family
,
&
tuple
))
{
goto
hotdrop
;
}
if
(
par
->
family
==
NFPROTO_IPV6
)
{
const
struct
ipv6hdr
*
iph
=
ipv6_hdr
(
skb
);
...
...
net/netfilter/xt_iprange.c
View file @
c79b9e49
...
...
@@ -31,7 +31,7 @@ iprange_mt4(const struct sk_buff *skb, struct xt_action_param *par)
pr_debug
(
"src IP %pI4 NOT in range %s%pI4-%pI4
\n
"
,
&
iph
->
saddr
,
(
info
->
flags
&
IPRANGE_SRC_INV
)
?
"(INV) "
:
""
,
&
info
->
src_m
ax
.
ip
,
&
info
->
src_m
in
.
ip
,
&
info
->
src_max
.
ip
);
return
false
;
}
...
...
@@ -78,15 +78,27 @@ iprange_mt6(const struct sk_buff *skb, struct xt_action_param *par)
m
=
iprange_ipv6_sub
(
&
iph
->
saddr
,
&
info
->
src_min
.
in6
)
<
0
;
m
|=
iprange_ipv6_sub
(
&
iph
->
saddr
,
&
info
->
src_max
.
in6
)
>
0
;
m
^=
!!
(
info
->
flags
&
IPRANGE_SRC_INV
);
if
(
m
)
if
(
m
)
{
pr_debug
(
"src IP %pI6 NOT in range %s%pI6-%pI6
\n
"
,
&
iph
->
saddr
,
(
info
->
flags
&
IPRANGE_SRC_INV
)
?
"(INV) "
:
""
,
&
info
->
src_min
.
in6
,
&
info
->
src_max
.
in6
);
return
false
;
}
}
if
(
info
->
flags
&
IPRANGE_DST
)
{
m
=
iprange_ipv6_sub
(
&
iph
->
daddr
,
&
info
->
dst_min
.
in6
)
<
0
;
m
|=
iprange_ipv6_sub
(
&
iph
->
daddr
,
&
info
->
dst_max
.
in6
)
>
0
;
m
^=
!!
(
info
->
flags
&
IPRANGE_DST_INV
);
if
(
m
)
if
(
m
)
{
pr_debug
(
"dst IP %pI6 NOT in range %s%pI6-%pI6
\n
"
,
&
iph
->
daddr
,
(
info
->
flags
&
IPRANGE_DST_INV
)
?
"(INV) "
:
""
,
&
info
->
dst_min
.
in6
,
&
info
->
dst_max
.
in6
);
return
false
;
}
}
return
true
;
}
...
...
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