Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
8337aaee
Commit
8337aaee
authored
Feb 11, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ipv4 parameter from kernel_setup.
parent
febf623a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
kernel.h
kernel.h
+1
-1
kernel_netlink.c
kernel_netlink.c
+11
-13
kernel_socket.c
kernel_socket.c
+1
-1
No files found.
kernel.h
View file @
8337aaee
...
@@ -37,7 +37,7 @@ struct kernel_route {
...
@@ -37,7 +37,7 @@ struct kernel_route {
extern
int
export_table
,
import_table
;
extern
int
export_table
,
import_table
;
int
kernel_setup
(
int
setup
,
int
ipv4
);
int
kernel_setup
(
int
setup
);
int
kernel_setup_socket
(
int
setup
);
int
kernel_setup_socket
(
int
setup
);
int
kernel_setup_interface
(
int
setup
,
const
char
*
ifname
,
int
ifindex
);
int
kernel_setup_interface
(
int
setup
,
const
char
*
ifname
,
int
ifindex
);
int
kernel_interface_operational
(
const
char
*
ifname
,
int
ifindex
);
int
kernel_interface_operational
(
const
char
*
ifname
,
int
ifindex
);
...
...
kernel_netlink.c
View file @
8337aaee
...
@@ -388,7 +388,7 @@ netlink_send_dump(int type, void *data, int len) {
...
@@ -388,7 +388,7 @@ netlink_send_dump(int type, void *data, int len) {
}
}
int
int
kernel_setup
(
int
setup
,
int
ipv4
)
kernel_setup
(
int
setup
)
{
{
int
rc
;
int
rc
;
...
@@ -422,19 +422,17 @@ kernel_setup(int setup, int ipv4)
...
@@ -422,19 +422,17 @@ kernel_setup(int setup, int ipv4)
return
-
1
;
return
-
1
;
}
}
if
(
ipv4
)
{
old_ipv4_forwarding
=
old_ipv4_forwarding
=
read_proc
(
"/proc/sys/net/ipv4/conf/all/forwarding"
);
read_proc
(
"/proc/sys/net/ipv4/conf/all/forwarding"
);
if
(
old_ipv4_forwarding
<
0
)
{
if
(
old_ipv4_forwarding
<
0
)
{
perror
(
"Couldn't read IPv4 forwarding knob."
);
perror
(
"Couldn't read IPv4 forwarding knob."
);
return
-
1
;
return
-
1
;
}
}
rc
=
write_proc
(
"/proc/sys/net/ipv4/conf/all/forwarding"
,
1
);
rc
=
write_proc
(
"/proc/sys/net/ipv4/conf/all/forwarding"
,
1
);
if
(
rc
<
0
)
{
if
(
rc
<
0
)
{
perror
(
"Couldn't write IPv4 forwarding knob."
);
perror
(
"Couldn't write IPv4 forwarding knob."
);
return
-
1
;
return
-
1
;
}
}
}
...
...
kernel_socket.c
View file @
8337aaee
...
@@ -138,7 +138,7 @@ plen2mask(int n, struct in6_addr *dest)
...
@@ -138,7 +138,7 @@ plen2mask(int n, struct in6_addr *dest)
}
}
int
int
kernel_setup
(
int
setup
,
int
ipv4
)
kernel_setup
(
int
setup
)
{
{
int
rc
;
int
rc
;
if
(
setup
)
{
if
(
setup
)
{
...
...
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