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
0dcd5052
Commit
0dcd5052
authored
Aug 31, 2012
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://1984.lsi.us.es/nf
parents
14a15d61
5b423f6a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
10 deletions
+25
-10
include/net/netfilter/nf_conntrack_ecache.h
include/net/netfilter/nf_conntrack_ecache.h
+1
-0
net/ipv4/netfilter/nf_nat_sip.c
net/ipv4/netfilter/nf_nat_sip.c
+4
-1
net/netfilter/ipvs/ip_vs_ctl.c
net/netfilter/ipvs/ip_vs_ctl.c
+3
-1
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_core.c
+11
-5
net/netfilter/nf_conntrack_netlink.c
net/netfilter/nf_conntrack_netlink.c
+2
-1
net/netfilter/nfnetlink_log.c
net/netfilter/nfnetlink_log.c
+4
-2
No files found.
include/net/netfilter/nf_conntrack_ecache.h
View file @
0dcd5052
...
@@ -18,6 +18,7 @@ struct nf_conntrack_ecache {
...
@@ -18,6 +18,7 @@ struct nf_conntrack_ecache {
u16
ctmask
;
/* bitmask of ct events to be delivered */
u16
ctmask
;
/* bitmask of ct events to be delivered */
u16
expmask
;
/* bitmask of expect events to be delivered */
u16
expmask
;
/* bitmask of expect events to be delivered */
u32
pid
;
/* netlink pid of destroyer */
u32
pid
;
/* netlink pid of destroyer */
struct
timer_list
timeout
;
};
};
static
inline
struct
nf_conntrack_ecache
*
static
inline
struct
nf_conntrack_ecache
*
...
...
net/ipv4/netfilter/nf_nat_sip.c
View file @
0dcd5052
...
@@ -502,7 +502,10 @@ static unsigned int ip_nat_sdp_media(struct sk_buff *skb, unsigned int dataoff,
...
@@ -502,7 +502,10 @@ static unsigned int ip_nat_sdp_media(struct sk_buff *skb, unsigned int dataoff,
ret
=
nf_ct_expect_related
(
rtcp_exp
);
ret
=
nf_ct_expect_related
(
rtcp_exp
);
if
(
ret
==
0
)
if
(
ret
==
0
)
break
;
break
;
else
if
(
ret
!=
-
EBUSY
)
{
else
if
(
ret
==
-
EBUSY
)
{
nf_ct_unexpect_related
(
rtp_exp
);
continue
;
}
else
if
(
ret
<
0
)
{
nf_ct_unexpect_related
(
rtp_exp
);
nf_ct_unexpect_related
(
rtp_exp
);
port
=
0
;
port
=
0
;
break
;
break
;
...
...
net/netfilter/ipvs/ip_vs_ctl.c
View file @
0dcd5052
...
@@ -1171,8 +1171,10 @@ ip_vs_add_service(struct net *net, struct ip_vs_service_user_kern *u,
...
@@ -1171,8 +1171,10 @@ ip_vs_add_service(struct net *net, struct ip_vs_service_user_kern *u,
goto
out_err
;
goto
out_err
;
}
}
svc
->
stats
.
cpustats
=
alloc_percpu
(
struct
ip_vs_cpu_stats
);
svc
->
stats
.
cpustats
=
alloc_percpu
(
struct
ip_vs_cpu_stats
);
if
(
!
svc
->
stats
.
cpustats
)
if
(
!
svc
->
stats
.
cpustats
)
{
ret
=
-
ENOMEM
;
goto
out_err
;
goto
out_err
;
}
/* I'm the first user of the service */
/* I'm the first user of the service */
atomic_set
(
&
svc
->
usecnt
,
0
);
atomic_set
(
&
svc
->
usecnt
,
0
);
...
...
net/netfilter/nf_conntrack_core.c
View file @
0dcd5052
...
@@ -249,12 +249,15 @@ static void death_by_event(unsigned long ul_conntrack)
...
@@ -249,12 +249,15 @@ static void death_by_event(unsigned long ul_conntrack)
{
{
struct
nf_conn
*
ct
=
(
void
*
)
ul_conntrack
;
struct
nf_conn
*
ct
=
(
void
*
)
ul_conntrack
;
struct
net
*
net
=
nf_ct_net
(
ct
);
struct
net
*
net
=
nf_ct_net
(
ct
);
struct
nf_conntrack_ecache
*
ecache
=
nf_ct_ecache_find
(
ct
);
BUG_ON
(
ecache
==
NULL
);
if
(
nf_conntrack_event
(
IPCT_DESTROY
,
ct
)
<
0
)
{
if
(
nf_conntrack_event
(
IPCT_DESTROY
,
ct
)
<
0
)
{
/* bad luck, let's retry again */
/* bad luck, let's retry again */
ct
->
timeout
.
expires
=
jiffies
+
ecache
->
timeout
.
expires
=
jiffies
+
(
random32
()
%
net
->
ct
.
sysctl_events_retry_timeout
);
(
random32
()
%
net
->
ct
.
sysctl_events_retry_timeout
);
add_timer
(
&
ct
->
timeout
);
add_timer
(
&
ecache
->
timeout
);
return
;
return
;
}
}
/* we've got the event delivered, now it's dying */
/* we've got the event delivered, now it's dying */
...
@@ -268,6 +271,9 @@ static void death_by_event(unsigned long ul_conntrack)
...
@@ -268,6 +271,9 @@ static void death_by_event(unsigned long ul_conntrack)
void
nf_ct_insert_dying_list
(
struct
nf_conn
*
ct
)
void
nf_ct_insert_dying_list
(
struct
nf_conn
*
ct
)
{
{
struct
net
*
net
=
nf_ct_net
(
ct
);
struct
net
*
net
=
nf_ct_net
(
ct
);
struct
nf_conntrack_ecache
*
ecache
=
nf_ct_ecache_find
(
ct
);
BUG_ON
(
ecache
==
NULL
);
/* add this conntrack to the dying list */
/* add this conntrack to the dying list */
spin_lock_bh
(
&
nf_conntrack_lock
);
spin_lock_bh
(
&
nf_conntrack_lock
);
...
@@ -275,10 +281,10 @@ void nf_ct_insert_dying_list(struct nf_conn *ct)
...
@@ -275,10 +281,10 @@ void nf_ct_insert_dying_list(struct nf_conn *ct)
&
net
->
ct
.
dying
);
&
net
->
ct
.
dying
);
spin_unlock_bh
(
&
nf_conntrack_lock
);
spin_unlock_bh
(
&
nf_conntrack_lock
);
/* set a new timer to retry event delivery */
/* set a new timer to retry event delivery */
setup_timer
(
&
ct
->
timeout
,
death_by_event
,
(
unsigned
long
)
ct
);
setup_timer
(
&
ecache
->
timeout
,
death_by_event
,
(
unsigned
long
)
ct
);
ct
->
timeout
.
expires
=
jiffies
+
ecache
->
timeout
.
expires
=
jiffies
+
(
random32
()
%
net
->
ct
.
sysctl_events_retry_timeout
);
(
random32
()
%
net
->
ct
.
sysctl_events_retry_timeout
);
add_timer
(
&
ct
->
timeout
);
add_timer
(
&
ecache
->
timeout
);
}
}
EXPORT_SYMBOL_GPL
(
nf_ct_insert_dying_list
);
EXPORT_SYMBOL_GPL
(
nf_ct_insert_dying_list
);
...
...
net/netfilter/nf_conntrack_netlink.c
View file @
0dcd5052
...
@@ -2790,7 +2790,8 @@ static int __init ctnetlink_init(void)
...
@@ -2790,7 +2790,8 @@ static int __init ctnetlink_init(void)
goto
err_unreg_subsys
;
goto
err_unreg_subsys
;
}
}
if
(
register_pernet_subsys
(
&
ctnetlink_net_ops
))
{
ret
=
register_pernet_subsys
(
&
ctnetlink_net_ops
);
if
(
ret
<
0
)
{
pr_err
(
"ctnetlink_init: cannot register pernet operations
\n
"
);
pr_err
(
"ctnetlink_init: cannot register pernet operations
\n
"
);
goto
err_unreg_exp_subsys
;
goto
err_unreg_exp_subsys
;
}
}
...
...
net/netfilter/nfnetlink_log.c
View file @
0dcd5052
...
@@ -480,7 +480,7 @@ __build_packet_message(struct nfulnl_instance *inst,
...
@@ -480,7 +480,7 @@ __build_packet_message(struct nfulnl_instance *inst,
}
}
if
(
indev
&&
skb_mac_header_was_set
(
skb
))
{
if
(
indev
&&
skb_mac_header_was_set
(
skb
))
{
if
(
nla_put_be
32
(
inst
->
skb
,
NFULA_HWTYPE
,
htons
(
skb
->
dev
->
type
))
||
if
(
nla_put_be
16
(
inst
->
skb
,
NFULA_HWTYPE
,
htons
(
skb
->
dev
->
type
))
||
nla_put_be16
(
inst
->
skb
,
NFULA_HWLEN
,
nla_put_be16
(
inst
->
skb
,
NFULA_HWLEN
,
htons
(
skb
->
dev
->
hard_header_len
))
||
htons
(
skb
->
dev
->
hard_header_len
))
||
nla_put
(
inst
->
skb
,
NFULA_HWHEADER
,
skb
->
dev
->
hard_header_len
,
nla_put
(
inst
->
skb
,
NFULA_HWHEADER
,
skb
->
dev
->
hard_header_len
,
...
@@ -996,8 +996,10 @@ static int __init nfnetlink_log_init(void)
...
@@ -996,8 +996,10 @@ static int __init nfnetlink_log_init(void)
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
if
(
!
proc_create
(
"nfnetlink_log"
,
0440
,
if
(
!
proc_create
(
"nfnetlink_log"
,
0440
,
proc_net_netfilter
,
&
nful_file_ops
))
proc_net_netfilter
,
&
nful_file_ops
))
{
status
=
-
ENOMEM
;
goto
cleanup_logger
;
goto
cleanup_logger
;
}
#endif
#endif
return
status
;
return
status
;
...
...
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