aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/ip_carp.c
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2018-11-01 17:26:18 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2018-11-01 17:26:18 +0000
commite2c532f15611d5f7d94be2d394f067eb094f0a7c (patch)
treefe563b751bb61d878e0380763d9ae617eb335316 /sys/netinet/ip_carp.c
parentb4b90c1f4ca9374df88cdeb96f70c43217bb993d (diff)
Notes
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r--sys/netinet/ip_carp.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 6c15629389f62..8d11f379cbdf3 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -2176,6 +2176,21 @@ static struct protosw in6_carp_protosw = {
};
#endif
+#ifdef VIMAGE
+#if defined(__i386__)
+/*
+ * XXX This is a hack to work around an absolute relocation outside
+ * set_vnet by one (on the stop symbol) for carpstats. Add a dummy variable
+ * to the end of the file in the hope that the linker will just keep the
+ * order (as it seems to do at the moment). It is understood to be fragile.
+ * See PR 230857 for a longer discussion of the problem and the referenced
+ * review for possible alternate solutions. Each is a hack; we just need
+ * the least intrusive one for the next release.
+ */
+VNET_DEFINE(char, carp_zzz) = 0xde;
+#endif
+#endif
+
static void
carp_mod_cleanup(void)
{