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
88e27cd6
Unverified
Commit
88e27cd6
authored
Feb 26, 2021
by
Stéphane Graber
Committed by
GitHub
Feb 26, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3699 from brauner/2021-02-26/network
network: fix networks with switched names
parents
32d40452
3a197a1b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
confile_utils.c
src/lxc/confile_utils.c
+2
-2
network.c
src/lxc/network.c
+0
-0
network.h
src/lxc/network.h
+1
-0
No files found.
src/lxc/confile_utils.c
View file @
88e27cd6
...
@@ -165,7 +165,7 @@ struct lxc_netdev *lxc_network_add(struct lxc_list *networks, int idx, bool tail
...
@@ -165,7 +165,7 @@ struct lxc_netdev *lxc_network_add(struct lxc_list *networks, int idx, bool tail
__do_free
struct
lxc_netdev
*
netdev
=
NULL
;
__do_free
struct
lxc_netdev
*
netdev
=
NULL
;
/* network does not exist */
/* network does not exist */
netdev
=
m
alloc
(
sizeof
(
*
netdev
));
netdev
=
z
alloc
(
sizeof
(
*
netdev
));
if
(
!
netdev
)
if
(
!
netdev
)
return
ret_set_errno
(
NULL
,
ENOMEM
);
return
ret_set_errno
(
NULL
,
ENOMEM
);
...
@@ -177,7 +177,7 @@ struct lxc_netdev *lxc_network_add(struct lxc_list *networks, int idx, bool tail
...
@@ -177,7 +177,7 @@ struct lxc_netdev *lxc_network_add(struct lxc_list *networks, int idx, bool tail
netdev
->
idx
=
idx
;
netdev
->
idx
=
idx
;
/* prepare new list */
/* prepare new list */
newlist
=
m
alloc
(
sizeof
(
*
newlist
));
newlist
=
z
alloc
(
sizeof
(
*
newlist
));
if
(
!
newlist
)
if
(
!
newlist
)
return
ret_set_errno
(
NULL
,
ENOMEM
);
return
ret_set_errno
(
NULL
,
ENOMEM
);
...
...
src/lxc/network.c
View file @
88e27cd6
This diff is collapsed.
Click to expand it.
src/lxc/network.h
View file @
88e27cd6
...
@@ -165,6 +165,7 @@ struct lxc_netdev {
...
@@ -165,6 +165,7 @@ struct lxc_netdev {
bool
l2proxy
;
bool
l2proxy
;
char
name
[
IFNAMSIZ
];
char
name
[
IFNAMSIZ
];
char
created_name
[
IFNAMSIZ
];
char
created_name
[
IFNAMSIZ
];
char
transient_name
[
IFNAMSIZ
];
char
*
hwaddr
;
char
*
hwaddr
;
char
*
mtu
;
char
*
mtu
;
union
netdev_p
priv
;
union
netdev_p
priv
;
...
...
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