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
3ebffb98
Unverified
Commit
3ebffb98
authored
Jul 03, 2019
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: s/loDev/loop_device/g
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
113ca429
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
network.c
src/lxc/network.c
+7
-7
No files found.
src/lxc/network.c
View file @
3ebffb98
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
lxc_log_define
(
network
,
lxc
);
lxc_log_define
(
network
,
lxc
);
typedef
int
(
*
instantiate_cb
)(
struct
lxc_handler
*
,
struct
lxc_netdev
*
);
typedef
int
(
*
instantiate_cb
)(
struct
lxc_handler
*
,
struct
lxc_netdev
*
);
static
const
char
lo
Dev
[]
=
"lo"
;
static
const
char
lo
op_device
[]
=
"lo"
;
static
int
lxc_ip_route_dest
(
__u16
nlmsg_type
,
int
family
,
int
ifindex
,
void
*
dest
,
unsigned
int
netmask
)
static
int
lxc_ip_route_dest
(
__u16
nlmsg_type
,
int
family
,
int
ifindex
,
void
*
dest
,
unsigned
int
netmask
)
{
{
...
@@ -2946,9 +2946,9 @@ static int lxc_setup_l2proxy(struct lxc_netdev *netdev) {
...
@@ -2946,9 +2946,9 @@ static int lxc_setup_l2proxy(struct lxc_netdev *netdev) {
}
}
/* Retrieve local-loopback interface index for use with IPVLAN static routes. */
/* Retrieve local-loopback interface index for use with IPVLAN static routes. */
lo_ifindex
=
if_nametoindex
(
lo
Dev
);
lo_ifindex
=
if_nametoindex
(
lo
op_device
);
if
(
lo_ifindex
==
0
)
{
if
(
lo_ifindex
==
0
)
{
ERROR
(
"Failed to retrieve ifindex for
\"
%s
\"
routing cleanup"
,
lo
Dev
);
ERROR
(
"Failed to retrieve ifindex for
\"
%s
\"
routing cleanup"
,
lo
op_device
);
return
minus_one_set_errno
(
EINVAL
);
return
minus_one_set_errno
(
EINVAL
);
}
}
}
}
...
@@ -2965,7 +2965,7 @@ static int lxc_setup_l2proxy(struct lxc_netdev *netdev) {
...
@@ -2965,7 +2965,7 @@ static int lxc_setup_l2proxy(struct lxc_netdev *netdev) {
if
(
netdev
->
type
==
LXC_NET_IPVLAN
)
{
if
(
netdev
->
type
==
LXC_NET_IPVLAN
)
{
err
=
lxc_ipv4_dest_add
(
lo_ifindex
,
&
inet4dev
->
addr
,
32
);
err
=
lxc_ipv4_dest_add
(
lo_ifindex
,
&
inet4dev
->
addr
,
32
);
if
(
err
<
0
)
{
if
(
err
<
0
)
{
ERROR
(
"Failed to add ipv4 dest
\"
%s
\"
for network device
\"
%s
\"
"
,
bufinet4
,
lo
Dev
);
ERROR
(
"Failed to add ipv4 dest
\"
%s
\"
for network device
\"
%s
\"
"
,
bufinet4
,
lo
op_device
);
return
minus_one_set_errno
(
-
err
);
return
minus_one_set_errno
(
-
err
);
}
}
}
}
...
@@ -2983,7 +2983,7 @@ static int lxc_setup_l2proxy(struct lxc_netdev *netdev) {
...
@@ -2983,7 +2983,7 @@ static int lxc_setup_l2proxy(struct lxc_netdev *netdev) {
if
(
netdev
->
type
==
LXC_NET_IPVLAN
)
{
if
(
netdev
->
type
==
LXC_NET_IPVLAN
)
{
err
=
lxc_ipv6_dest_add
(
lo_ifindex
,
&
inet6dev
->
addr
,
128
);
err
=
lxc_ipv6_dest_add
(
lo_ifindex
,
&
inet6dev
->
addr
,
128
);
if
(
err
<
0
)
{
if
(
err
<
0
)
{
ERROR
(
"Failed to add ipv6 dest
\"
%s
\"
for network device
\"
%s
\"
"
,
bufinet6
,
lo
Dev
);
ERROR
(
"Failed to add ipv6 dest
\"
%s
\"
for network device
\"
%s
\"
"
,
bufinet6
,
lo
op_device
);
return
minus_one_set_errno
(
-
err
);
return
minus_one_set_errno
(
-
err
);
}
}
}
}
...
@@ -3060,10 +3060,10 @@ static int lxc_delete_l2proxy(struct lxc_netdev *netdev) {
...
@@ -3060,10 +3060,10 @@ static int lxc_delete_l2proxy(struct lxc_netdev *netdev) {
/* Perform IPVLAN specific checks. */
/* Perform IPVLAN specific checks. */
if
(
netdev
->
type
==
LXC_NET_IPVLAN
)
{
if
(
netdev
->
type
==
LXC_NET_IPVLAN
)
{
/* Retrieve local-loopback interface index for use with IPVLAN static routes. */
/* Retrieve local-loopback interface index for use with IPVLAN static routes. */
lo_ifindex
=
if_nametoindex
(
lo
Dev
);
lo_ifindex
=
if_nametoindex
(
lo
op_device
);
if
(
lo_ifindex
==
0
)
{
if
(
lo_ifindex
==
0
)
{
errCount
++
;
errCount
++
;
ERROR
(
"Failed to retrieve ifindex for
\"
%s
\"
routing cleanup"
,
lo
Dev
);
ERROR
(
"Failed to retrieve ifindex for
\"
%s
\"
routing cleanup"
,
lo
op_device
);
}
}
}
}
...
...
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