diff options
author | Bernd Eckenfels <net-tools@lina.inka.de> | 2000-07-31 01:13:33 +0000 |
---|---|---|
committer | Bernd Eckenfels <net-tools@lina.inka.de> | 2000-07-31 01:13:33 +0000 |
commit | 12da0010e8f038033e85539d2e064be033aa3eb4 (patch) | |
tree | 92b27cf49a681b65bc19628bc08594d33d600e77 /ifconfig.c | |
parent | make net-lib compile again, not sure why this is not passed to the subdir (diff) | |
download | net-tools-12da0010e8f038033e85539d2e064be033aa3eb4.tar.gz net-tools-12da0010e8f038033e85539d2e064be033aa3eb4.tar.bz2 net-tools-12da0010e8f038033e85539d2e064be033aa3eb4.zip |
fixed a segfault condition in ifconfig when setting hw address for AF loop,
as reorted by ADAM Sulmicki.
Diffstat (limited to 'ifconfig.c')
-rw-r--r-- | ifconfig.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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.39 2000/06/11 15:44:21 pb Exp $ + * Version: $Id: ifconfig.c,v 1.40 2000/07/31 01:13:33 ecki Exp $ * * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> * and others. Copyright 1993 MicroWalt Corporation @@ -636,6 +636,12 @@ int main(int argc, char **argv) usage(); if ((hw = get_hwtype(*spp)) == NULL) usage(); + if (hw->input == NULL) { + fprintf(stderr, _("hw address type `%s' has no handler to set address. failed.\n"), *spp); + spp+=2; + goterr = 1; + continue; + } if (*++spp == NULL) usage(); safe_strncpy(host, *spp, (sizeof host)); |