Module Name: src
Committed By: dyoung
Date: Tue Apr 28 21:26:52 UTC 2009
Modified Files:
src/sys/net: if_ethersubr.c
Log Message:
Let this build with 'no options INET'.
(I don't know why I bothered, either.)
To generate a diff of this commit:
cvs rdiff -u -r1.170 -r1.171 src/sys/net/if_ethersubr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.170 src/sys/net/if_ethersubr.c:1.171
--- src/sys/net/if_ethersubr.c:1.170 Fri Nov 7 00:20:13 2008
+++ src/sys/net/if_ethersubr.c Tue Apr 28 21:26:51 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ethersubr.c,v 1.170 2008/11/07 00:20:13 dyoung Exp $ */
+/* $NetBSD: if_ethersubr.c,v 1.171 2009/04/28 21:26:51 dyoung Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.170 2008/11/07 00:20:13 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.171 2009/04/28 21:26:51 dyoung Exp $");
#include "opt_inet.h"
#include "opt_atalk.h"
@@ -1448,7 +1448,6 @@
{
struct ethercom *ec = (void *) ifp;
struct ifreq *ifr = (struct ifreq *)data;
- struct ifaddr *ifa = (struct ifaddr *)data;
struct if_laddrreq *iflr = data;
const struct sockaddr_dl *sdl;
static const uint8_t zero[ETHER_ADDR_LEN];
@@ -1463,8 +1462,12 @@
return error;
}
#ifdef INET
- if (ifa->ifa_addr->sa_family == AF_INET)
- arp_ifinit(ifp, ifa);
+ {
+ struct ifaddr *ifa = (struct ifaddr *)data;
+
+ if (ifa->ifa_addr->sa_family == AF_INET)
+ arp_ifinit(ifp, ifa);
+ }
#endif /* INET */
return 0;