Description of problem: nameif segfaults if run twice. Version-Release number of selected component (if applicable): net-tools-1.60 (from RHL8.0 and Phoebe beta5+ "special bits of rawhide") How reproducible: always This note sent to net-tools.de: I'm running net-tools-1.60 as found in Red Hat Linux 7.3, 8.0, and special bits of rawhide (precursor to the public release of the beta known as Phoebe). In all cases, nameif segfaults if run twice on a system. The general case seems to be at the end of main, it frees ch twice. At least that's my guess. GDB shows the fault is in calling free here. while (clist) { struct change *ch = clist; clist = clist->next; warning(_("interface '%s' not found"), ch->ifname); free(ch); } Here's what the program reports: interface 'wireless' not found interface '' not found Segmentation fault Here's what my mactab has: builtin 00:06:5B:B6:8B:E4 wireless 00:02:2D:5D:1D:48 dock 00:06:5B:EA:36:7A (those are tabs between the ifname and the mac). Here's what /proc/net/dev shows: Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed lo: 694808 6381 0 0 0 0 0 0 694808 6381 0 0 0 0 0 0 builtin: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dock:98602373 291233 0 0 1 0 0 0 6314187 53334 0 0 0 0 0 0 wireless: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Since I've already called nameif once, my wireless device had its name changed the first go-round. I haven't had time to track this down further. Any help would be appreciated. FWIW, I'm hoping to get Red Hat to add calling nameif during their initscripts, inside /etc/sysconfig/network-scripts/network-functions:is_available() after the modprobe so we start getting the "right" names ASAP.
Moving to Public Beta status so Bernd Eckenfels <ecki.de> can see it. The public beta behaves the same way.
Created attachment 90502 [details] I think this will fix it I annot reproduce it, but this patch produces a much simpler list handling. It also fixes a small glitch in the usage printout, this is against 1.60. (CVS nameif.c 1.1).
The above patch fixes it for me. Leaving open until it's included in a release or errata.
ISSUE TRACKER 17080 opened by Dell as Sev 3
Patch verified and included in net-tools-1.60-13 Read ya, Phil
*** Bug 89441 has been marked as a duplicate of this bug. ***
An errata has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2003-164.html