Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elijah Grubb
emulab-devel
Commits
33e56382
Commit
33e56382
authored
May 17, 2018
by
David Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bring the Linux ipod module up to at least the 4.15 era.
parent
d6c142be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
ipod/linux_mod/ipod.c
ipod/linux_mod/ipod.c
+13
-2
No files found.
ipod/linux_mod/ipod.c
View file @
33e56382
/*
* Copyright (c) 2000-201
6
University of Utah and the Flux Group.
* Copyright (c) 2000-201
8
University of Utah and the Flux Group.
*
* {{{EMULAB-LICENSE
*
...
...
@@ -104,7 +104,10 @@ static struct ctl_table ipod_table[] = {
.
mode
=
0600
,
.
proc_handler
=
__PHP
proc_dostring
,
},
{
0
},
{
.
procname
=
NULL
,
.
data
=
NULL
,
.
proc_handler
=
NULL
,
},
};
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
...
...
@@ -270,7 +273,11 @@ static int __init ipod_init_module(void) {
/*
* Register our netfilter hook function.
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0)
rc
=
nf_register_net_hook
(
&
init_net
,
&
ipod_hook_ops
);
#else
rc
=
nf_register_hook
(
&
ipod_hook_ops
);
#endif
if
(
rc
)
{
printk
(
KERN_ERR
"netfilter registration failed (%d)!
\n
"
,
rc
);
unregister_net_sysctl_table
(
ipod_table_header
);
...
...
@@ -282,7 +289,11 @@ static int __init ipod_init_module(void) {
static
void
__exit
ipod_cleanup_module
(
void
)
{
printk
(
KERN_INFO
"removing IPOD
\n
"
);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0)
nf_unregister_net_hook
(
&
init_net
,
&
ipod_hook_ops
);
#else
nf_unregister_hook
(
&
ipod_hook_ops
);
#endif
unregister_net_sysctl_table
(
ipod_table_header
);
}
...
...
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