When setting point-to-point address, use the AF-specific
authorPhil Blundell <philb@gnu.org>
Sun, 17 Jan 1999 21:20:25 +0000 (21:20 +0000)
committerPhil Blundell <philb@gnu.org>
Sun, 17 Jan 1999 21:20:25 +0000 (21:20 +0000)
socket not the generic one.

ifconfig.c

index a15dff5..fcb3419 100644 (file)
@@ -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.26 1999/01/05 20:52:58 philip Exp $
+ * Version:     $Id: ifconfig.c,v 1.27 1999/01/17 21:20:25 philip Exp $
  *
  * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  *              and others.  Copyright 1993 MicroWalt Corporation
@@ -860,7 +860,7 @@ int main(int argc, char **argv)
                }
                memcpy((char *) &ifr.ifr_dstaddr, (char *) &sa,
                       sizeof(struct sockaddr));
-               if (ioctl(skfd, SIOCSIFDSTADDR, &ifr) < 0) {
+               if (ioctl(ap->fd, SIOCSIFDSTADDR, &ifr) < 0) {
                    fprintf(stderr, "SIOCSIFDSTADDR: %s\n",
                            strerror(errno));
                    goterr = 1;