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
af651aa9
Commit
af651aa9
authored
Sep 09, 2015
by
Stephane Nguyen
Committed by
Stéphane Graber
Sep 21, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing MTU calculation in instantiate_veth()]
Signed-off-by:
Stephane Nguyen
<
stephminh@yahoo.es
>
Acked-by:
Serge E. Hallyn
<
serge.hallyn@ubuntu.com
>
parent
28272964
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
conf.c
src/lxc/conf.c
+7
-7
No files found.
src/lxc/conf.c
View file @
af651aa9
...
@@ -2600,10 +2600,16 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd
...
@@ -2600,10 +2600,16 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd
goto
out_delete
;
goto
out_delete
;
}
}
netdev
->
ifindex
=
if_nametoindex
(
veth2
);
if
(
!
netdev
->
ifindex
)
{
ERROR
(
"failed to retrieve the index for %s"
,
veth2
);
goto
out_delete
;
}
if
(
netdev
->
mtu
)
{
if
(
netdev
->
mtu
)
{
mtu
=
atoi
(
netdev
->
mtu
);
mtu
=
atoi
(
netdev
->
mtu
);
}
else
if
(
netdev
->
link
)
{
}
else
if
(
netdev
->
link
)
{
mtu
=
netdev_get_mtu
(
if_nametoindex
(
netdev
->
link
)
);
mtu
=
netdev_get_mtu
(
netdev
->
ifindex
);
}
}
if
(
mtu
)
{
if
(
mtu
)
{
...
@@ -2626,12 +2632,6 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd
...
@@ -2626,12 +2632,6 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd
}
}
}
}
netdev
->
ifindex
=
if_nametoindex
(
veth2
);
if
(
!
netdev
->
ifindex
)
{
ERROR
(
"failed to retrieve the index for %s"
,
veth2
);
goto
out_delete
;
}
err
=
lxc_netdev_up
(
veth1
);
err
=
lxc_netdev_up
(
veth1
);
if
(
err
)
{
if
(
err
)
{
ERROR
(
"failed to set %s up : %s"
,
veth1
,
strerror
(
-
err
));
ERROR
(
"failed to set %s up : %s"
,
veth1
,
strerror
(
-
err
));
...
...
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