FBSD: VIMAGE support
authorBen Kaduk <kaduk@mit.edu>
Thu, 26 May 2011 05:11:14 +0000 (01:11 -0400)
committerDerrick Brashear <shadow@dementia.org>
Thu, 26 May 2011 05:58:14 +0000 (22:58 -0700)
Starting in FreeBSD 8.0, there is support for multiple virtual
network stacks (generally to be exposed to separate jail(8) environments).
It is enabled as a kernel configuration option, so our builds against
GENERIC have not failed, but we fail to build when options VIMAGE
is present.  Fix our variable references accordingly.

Change-Id: I679361b8ea62b0eae90c0aa61287dfc2dd189481
Submitted-by: Hiroki Sato of freebsd.org
Reviewed-on: http://gerrit.openafs.org/4721
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/afs/afs_server.c
src/rx/rx_kcommon.c

index e177358..83d393a 100644 (file)
@@ -1637,7 +1637,11 @@ afs_SetServerPrefs(struct srvAddr *sa)
 #elif defined(AFS_FBSD_ENV)
     {
        struct in_ifaddr *ifa;
+#if defined(AFS_FBSD80_ENV)
+         TAILQ_FOREACH(ifa, &V_in_ifaddrhead, ia_link) {
+#else
          TAILQ_FOREACH(ifa, &in_ifaddrhead, ia_link) {
+#endif
            afsi_SetServerIPRank(sa, ifa);
     }}
 #elif defined(AFS_OBSD_ENV)
index a7c9759..e223469 100644 (file)
@@ -667,7 +667,11 @@ rxi_GetIFInfo(void)
     }
 #else
 #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_FBSD80_ENV)
+    TAILQ_FOREACH(ifn, &V_ifnet, if_link) {
+#else
     TAILQ_FOREACH(ifn, &ifnet, if_link) {
+#endif
        if (i >= ADDRSPERSITE)
            break;
 #elif defined(AFS_OBSD_ENV) || defined(AFS_NBSD_ENV)