Commit 188a83fa authored by Bernd Eckenfels's avatar Bernd Eckenfels

Avoid segfault of ifconfig(8) on missing /proc/net/dev

(Debian Bug #222209 Pierre Lombard, Tollef Fog Heen)
parent 00097121
......@@ -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, <waltje@uwalt.nl.mugnet.org>
* 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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment