Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
b28e2826
Unverified
Commit
b28e2826
authored
Jan 23, 2018
by
Christian Brauner
Committed by
GitHub
Jan 23, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2103 from marcosps/forward_not_used
network.c: Remove ip_forward_set and callers
parents
f947066a
c0a6d713
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
32 deletions
+0
-32
network.c
src/lxc/network.c
+0
-26
network.h
src/lxc/network.h
+0
-6
No files found.
src/lxc/network.c
View file @
b28e2826
...
...
@@ -1368,32 +1368,6 @@ static int proc_sys_net_write(const char *path, const char *value)
return
err
;
}
static
int
ip_forward_set
(
const
char
*
ifname
,
int
family
,
int
flag
)
{
int
rc
;
char
path
[
MAXPATHLEN
];
if
(
family
!=
AF_INET
&&
family
!=
AF_INET6
)
return
-
EINVAL
;
rc
=
snprintf
(
path
,
MAXPATHLEN
,
"/proc/sys/net/%s/conf/%s/forwarding"
,
family
==
AF_INET
?
"ipv4"
:
"ipv6"
,
ifname
);
if
(
rc
<
0
||
(
size_t
)
rc
>=
MAXPATHLEN
)
return
-
E2BIG
;
return
proc_sys_net_write
(
path
,
flag
?
"1"
:
"0"
);
}
int
lxc_ip_forward_on
(
const
char
*
ifname
,
int
family
)
{
return
ip_forward_set
(
ifname
,
family
,
1
);
}
int
lxc_ip_forward_off
(
const
char
*
ifname
,
int
family
)
{
return
ip_forward_set
(
ifname
,
family
,
0
);
}
static
int
neigh_proxy_set
(
const
char
*
ifname
,
int
family
,
int
flag
)
{
int
ret
;
...
...
src/lxc/network.h
View file @
b28e2826
...
...
@@ -207,12 +207,6 @@ extern int lxc_macvlan_create(const char *master, const char *name, int mode);
extern
int
lxc_vlan_create
(
const
char
*
master
,
const
char
*
name
,
unsigned
short
vid
);
/* Activate forwarding.*/
extern
int
lxc_ip_forward_on
(
const
char
*
name
,
int
family
);
/* Disable forwarding. */
extern
int
lxc_ip_forward_off
(
const
char
*
name
,
int
family
);
/* Set ip address. */
extern
int
lxc_ipv6_addr_add
(
int
ifindex
,
struct
in6_addr
*
addr
,
struct
in6_addr
*
mcast
,
...
...
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