patch for proxy arp stuff
authorPaul Mackerras <paulus@samba.org>
Thu, 9 Jun 1994 02:19:37 +0000 (02:19 +0000)
committerPaul Mackerras <paulus@samba.org>
Thu, 9 Jun 1994 02:19:37 +0000 (02:19 +0000)
pppd/sys-linux.c

index 708323314bb564688a3f478e09a6b8a3d30cf0f4..306ae4a8bca14468b89c64dc61a689e15545f1e6 100644 (file)
@@ -775,16 +775,20 @@ int get_ether_addr (u_long ipaddr, struct sockaddr *hwaddr)
     }
 
     hwaddr->sa_family = ARPHRD_ETHER;
+#ifndef old_ifr_hwaddr
     memcpy (&hwaddr->sa_data, &ifreq.ifr_hwaddr, ETH_ALEN);
+#else
+    memcpy (&hwaddr->sa_data, &ifreq.ifr_hwaddr.sa_data, ETH_ALEN);
+#endif
 
     MAINDEBUG ((LOG_DEBUG,
                "proxy arp: found hwaddr %02x:%02x:%02x:%02x:%02x:%02x",
-               (int) ((unsigned char *) &ifreq.ifr_hwaddr)[0],
-               (int) ((unsigned char *) &ifreq.ifr_hwaddr)[1],
-               (int) ((unsigned char *) &ifreq.ifr_hwaddr)[2],
-               (int) ((unsigned char *) &ifreq.ifr_hwaddr)[3],
-               (int) ((unsigned char *) &ifreq.ifr_hwaddr)[4],
-               (int) ((unsigned char *) &ifreq.ifr_hwaddr)[5]));
+               (int) ((unsigned char *) &hwaddr->sa_data)[0],
+               (int) ((unsigned char *) &hwaddr->sa_data)[1],
+               (int) ((unsigned char *) &hwaddr->sa_data)[2],
+               (int) ((unsigned char *) &hwaddr->sa_data)[3],
+               (int) ((unsigned char *) &hwaddr->sa_data)[4],
+               (int) ((unsigned char *) &hwaddr->sa_data)[5]));
     return 1;
 }