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
917a7c15
Unverified
Commit
917a7c15
authored
Jan 15, 2020
by
Christian Brauner
Committed by
GitHub
Jan 15, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3253 from tomponline/tp-network-mtu
network: Restore fixed MTU functionality
parents
e0f80435
a00fbab5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
network.c
src/lxc/network.c
+5
-3
No files found.
src/lxc/network.c
View file @
917a7c15
...
...
@@ -273,7 +273,7 @@ static int lxc_is_ip_forwarding_enabled(const char *ifname, int family)
static
int
instantiate_veth
(
struct
lxc_handler
*
handler
,
struct
lxc_netdev
*
netdev
)
{
int
err
;
unsigned
int
mtu
;
unsigned
int
mtu
=
1500
;
char
*
veth1
,
*
veth2
;
char
veth1buf
[
IFNAMSIZ
],
veth2buf
[
IFNAMSIZ
];
...
...
@@ -302,8 +302,10 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd
if
(
!
veth2
)
return
-
1
;
if
(
netdev
->
mtu
&&
lxc_safe_uint
(
netdev
->
mtu
,
&
mtu
))
{
return
log_error_errno
(
-
1
,
errno
,
"Failed to parse mtu"
);
/* if mtu is specified in config then use that, otherwise inherit from link device if provided. */
if
(
netdev
->
mtu
)
{
if
(
lxc_safe_uint
(
netdev
->
mtu
,
&
mtu
))
return
log_error_errno
(
-
1
,
errno
,
"Failed to parse mtu"
);
}
else
if
(
netdev
->
link
[
0
]
!=
'\0'
)
{
int
ifindex_mtu
;
...
...
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