Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
net-tools
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
net-tools
Commits
8cd8f53b
Commit
8cd8f53b
authored
Jun 14, 2002
by
Bernd Eckenfels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
this fixes segfault on -A "" and -F "" in mii-tool reported in debian
bug #139027
parent
7e52da1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
mii-tool.c
mii-tool.c
+6
-2
No files found.
mii-tool.c
View file @
8cd8f53b
...
...
@@ -166,7 +166,7 @@ static int parse_media(char *arg)
s
=
strtok
(
arg
,
", "
);
do
{
for
(
i
=
0
;
i
<
NMEDIA
;
i
++
)
if
(
strcasecmp
(
media
[
i
].
name
,
s
)
==
0
)
break
;
if
(
s
&&
s
trcasecmp
(
media
[
i
].
name
,
s
)
==
0
)
break
;
if
(
i
==
NMEDIA
)
goto
failed
;
mask
|=
media
[
i
].
value
;
}
while
((
s
=
strtok
(
NULL
,
", "
))
!=
NULL
);
...
...
@@ -329,7 +329,7 @@ static int do_one_xcvr(int skfd, char *ifname, int maybe)
printf
(
"resetting the transceiver...
\n
"
);
mdio_write
(
skfd
,
MII_BMCR
,
MII_BMCR_RESET
);
}
if
(
nway_advertise
)
{
if
(
nway_advertise
>
0
)
{
mdio_write
(
skfd
,
MII_ANAR
,
nway_advertise
|
1
);
opt_restart
=
1
;
}
...
...
@@ -411,6 +411,10 @@ int main(int argc, char **argv)
}
/* Check for a few inappropriate option combinations */
if
(
opt_watch
)
verbose
=
0
;
if
((
nway_advertise
<
0
)
||
(
fixed_speed
<
0
))
return
2
;
if
(
errflag
||
(
fixed_speed
&
(
fixed_speed
-
1
))
||
(
fixed_speed
&&
(
opt_restart
||
nway_advertise
)))
{
fprintf
(
stderr
,
usage
,
argv
[
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