Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
4c889498
Commit
4c889498
authored
Jul 14, 2008
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netfilter: Let nf_ct_kill() callers know if del_timer() returned true.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
79d16385
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
15 deletions
+18
-15
include/net/netfilter/nf_conntrack.h
include/net/netfilter/nf_conntrack.h
+10
-10
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_core.c
+8
-5
No files found.
include/net/netfilter/nf_conntrack.h
View file @
4c889498
...
@@ -223,23 +223,23 @@ static inline void nf_ct_refresh(struct nf_conn *ct,
...
@@ -223,23 +223,23 @@ static inline void nf_ct_refresh(struct nf_conn *ct,
__nf_ct_refresh_acct
(
ct
,
0
,
skb
,
extra_jiffies
,
0
);
__nf_ct_refresh_acct
(
ct
,
0
,
skb
,
extra_jiffies
,
0
);
}
}
extern
void
__nf_ct_kill_acct
(
struct
nf_conn
*
ct
,
extern
bool
__nf_ct_kill_acct
(
struct
nf_conn
*
ct
,
enum
ip_conntrack_info
ctinfo
,
enum
ip_conntrack_info
ctinfo
,
const
struct
sk_buff
*
skb
,
const
struct
sk_buff
*
skb
,
int
do_acct
);
int
do_acct
);
/* kill conntrack and do accounting */
/* kill conntrack and do accounting */
static
inline
void
nf_ct_kill_acct
(
struct
nf_conn
*
ct
,
static
inline
bool
nf_ct_kill_acct
(
struct
nf_conn
*
ct
,
enum
ip_conntrack_info
ctinfo
,
enum
ip_conntrack_info
ctinfo
,
const
struct
sk_buff
*
skb
)
const
struct
sk_buff
*
skb
)
{
{
__nf_ct_kill_acct
(
ct
,
ctinfo
,
skb
,
1
);
return
__nf_ct_kill_acct
(
ct
,
ctinfo
,
skb
,
1
);
}
}
/* kill conntrack without accounting */
/* kill conntrack without accounting */
static
inline
void
nf_ct_kill
(
struct
nf_conn
*
ct
)
static
inline
bool
nf_ct_kill
(
struct
nf_conn
*
ct
)
{
{
__nf_ct_kill_acct
(
ct
,
0
,
NULL
,
0
);
return
__nf_ct_kill_acct
(
ct
,
0
,
NULL
,
0
);
}
}
/* These are for NAT. Icky. */
/* These are for NAT. Icky. */
...
...
net/netfilter/nf_conntrack_core.c
View file @
4c889498
...
@@ -848,7 +848,7 @@ acct:
...
@@ -848,7 +848,7 @@ acct:
}
}
EXPORT_SYMBOL_GPL
(
__nf_ct_refresh_acct
);
EXPORT_SYMBOL_GPL
(
__nf_ct_refresh_acct
);
void
__nf_ct_kill_acct
(
struct
nf_conn
*
ct
,
bool
__nf_ct_kill_acct
(
struct
nf_conn
*
ct
,
enum
ip_conntrack_info
ctinfo
,
enum
ip_conntrack_info
ctinfo
,
const
struct
sk_buff
*
skb
,
const
struct
sk_buff
*
skb
,
int
do_acct
)
int
do_acct
)
...
@@ -862,8 +862,11 @@ void __nf_ct_kill_acct(struct nf_conn *ct,
...
@@ -862,8 +862,11 @@ void __nf_ct_kill_acct(struct nf_conn *ct,
spin_unlock_bh
(
&
nf_conntrack_lock
);
spin_unlock_bh
(
&
nf_conntrack_lock
);
}
}
#endif
#endif
if
(
del_timer
(
&
ct
->
timeout
))
if
(
del_timer
(
&
ct
->
timeout
))
{
ct
->
timeout
.
function
((
unsigned
long
)
ct
);
ct
->
timeout
.
function
((
unsigned
long
)
ct
);
return
true
;
}
return
false
;
}
}
EXPORT_SYMBOL_GPL
(
__nf_ct_kill_acct
);
EXPORT_SYMBOL_GPL
(
__nf_ct_kill_acct
);
...
...
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