Commit 8337aaee authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Remove ipv4 parameter from kernel_setup.

parent febf623a
......@@ -37,7 +37,7 @@ struct kernel_route {
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_interface(int setup, const char *ifname, int ifindex);
int kernel_interface_operational(const char *ifname, int ifindex);
......
......@@ -388,7 +388,7 @@ netlink_send_dump(int type, void *data, int len) {
}
int
kernel_setup(int setup, int ipv4)
kernel_setup(int setup)
{
int rc;
......@@ -422,19 +422,17 @@ kernel_setup(int setup, int ipv4)
return -1;
}
if(ipv4) {
old_ipv4_forwarding =
read_proc("/proc/sys/net/ipv4/conf/all/forwarding");
if(old_ipv4_forwarding < 0) {
perror("Couldn't read IPv4 forwarding knob.");
return -1;
}
old_ipv4_forwarding =
read_proc("/proc/sys/net/ipv4/conf/all/forwarding");
if(old_ipv4_forwarding < 0) {
perror("Couldn't read IPv4 forwarding knob.");
return -1;
}
rc = write_proc("/proc/sys/net/ipv4/conf/all/forwarding", 1);
if(rc < 0) {
perror("Couldn't write IPv4 forwarding knob.");
return -1;
}
rc = write_proc("/proc/sys/net/ipv4/conf/all/forwarding", 1);
if(rc < 0) {
perror("Couldn't write IPv4 forwarding knob.");
return -1;
}
......
......@@ -138,7 +138,7 @@ plen2mask(int n, struct in6_addr *dest)
}
int
kernel_setup(int setup, int ipv4)
kernel_setup(int setup)
{
int rc;
if(setup) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment