NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/46579: ifconfig prints unnecessary message when deleting interface



The following reply was made to PR bin/46579; it has been noted by GNATS.

From: Julian Djamil Fagir <gnrp%komkon2.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/46579: ifconfig prints unnecessary message when deleting
 interface
Date: Sun, 30 Dec 2012 23:16:35 +0100

 --MP_/NUYn1jRj5Lb3CVeOSISdgkf
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: inline
 
 Hi,
 
 this is a student from GCi. I append the original patch he proposed, somehow
 Google Mail ate the encoding.
 
 On Sat, 29 Dec 2012 14:30:13 +0000 (UTC) =E7=8E=8B=E6=98=8E=E5=93=B2 wrote:
 > The following reply was made to PR bin/46579; it has been noted by GNATS.
 >  This is the bug fix for bin.46579.
 > =20
 >  Detail:
 >  When the interface is destroyed, ifconfig doesn't quit immediately. It
 >  tries to configure it instead, like the most common usage. Because the
 >  interface is destroyed, errors occur when opening the device.
 
 Regards, Julian
 
 --MP_/NUYn1jRj5Lb3CVeOSISdgkf
 Content-Type: text/x-patch
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment; filename=ifconfig.diff
 
 Index: ifconfig.c
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/sbin/ifconfig/ifconfig.c,v
 retrieving revision 1.228
 diff -u -a -r1.228 ifconfig.c
 --- ifconfig.c 1 Nov 2012 13:43:23 -0000       1.228
 +++ ifconfig.c 25 Dec 2012 10:01:24 -0000
 @@ -866,6 +866,11 @@
                warn("%s", __func__);
                return -1;
        }
 +
 +      if (cmd =3D=3D SIOCIFDESTROY) {
 +              /* If the interface is destroyed, no settings needs to apply. */
 +              exit(EXIT_SUCCESS);
 +      }
        return 0;
  }
 =20
 
 --MP_/NUYn1jRj5Lb3CVeOSISdgkf--
 



Home | Main Index | Thread Index | Old Index