Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
6a88fbe7
Commit
6a88fbe7
authored
Oct 01, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipconfig: use dev_set_mtu()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
b1b0c245
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
net/ipv4/ipconfig.c
net/ipv4/ipconfig.c
+3
-14
No files found.
net/ipv4/ipconfig.c
View file @
6a88fbe7
...
...
@@ -329,17 +329,6 @@ set_sockaddr(struct sockaddr_in *sin, __be32 addr, __be16 port)
sin
->
sin_port
=
port
;
}
static
int
__init
ic_dev_ioctl
(
unsigned
int
cmd
,
struct
ifreq
*
arg
)
{
int
res
;
mm_segment_t
oldfs
=
get_fs
();
set_fs
(
get_ds
());
res
=
dev_ioctl
(
&
init_net
,
cmd
,
(
struct
ifreq
__user
*
)
arg
);
set_fs
(
oldfs
);
return
res
;
}
/*
* Set up interface addresses and routes.
*/
...
...
@@ -375,11 +364,11 @@ static int __init ic_setup_if(void)
* out, we'll try to muddle along.
*/
if
(
ic_dev_mtu
!=
0
)
{
strcpy
(
ir
.
ifr_name
,
ic_dev
->
dev
->
name
);
ir
.
ifr_mtu
=
ic_dev_mtu
;
if
((
err
=
ic_dev_ioctl
(
SIOCSIFMTU
,
&
ir
))
<
0
)
rtnl_lock
();
if
((
err
=
dev_set_mtu
(
ic_dev
->
dev
,
ic_dev_mtu
))
<
0
)
pr_err
(
"IP-Config: Unable to set interface mtu to %d (%d)
\n
"
,
ic_dev_mtu
,
err
);
rtnl_unlock
();
}
return
0
;
}
...
...
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