-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid segfault of ifconfig(8) on missing /proc/net/dev
(Debian Bug #222209 Pierre Lombard, Tollef Fog Heen)
- Loading branch information
Bernd Eckenfels
committed
Oct 2, 2008
1 parent
0009712
commit 188a83f
Showing
1 changed file
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* that either displays or sets the characteristics of | ||
* one or more of the system's networking interfaces. | ||
* | ||
* Version: $Id: ifconfig.c,v 1.57 2002/12/10 00:56:41 ecki Exp $ | ||
* Version: $Id: ifconfig.c,v 1.58 2008/10/02 23:31:04 ecki Exp $ | ||
* | ||
* Author: Fred N. van Kempen, <[email protected]> | ||
* and others. Copyright 1993 MicroWalt Corporation | ||
|
@@ -112,6 +112,9 @@ static int if_print(char *ifname) | |
struct interface *ife; | ||
|
||
ife = lookup_interface(ifname); | ||
if (!ife) { | ||
return -1; | ||
} | ||
res = do_if_fetch(ife); | ||
if (res >= 0) | ||
ife_print(ife); | ||
|