summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2016-12-07 19:17:52 +0000
committermikeb <mikeb@openbsd.org>2016-12-07 19:17:52 +0000
commita436f00532870e475790295e6522b797892b91c9 (patch)
tree77e4216c2ab3e3cd6cea23d7bfd06d4da628680e
parentadd missing .Nm SSL_peek in the NAME section (diff)
downloadwireguard-openbsd-a436f00532870e475790295e6522b797892b91c9.tar.xz
wireguard-openbsd-a436f00532870e475790295e6522b797892b91c9.zip
Fall back to the minimum amount of ring pages
Some AWS volumes lack both max-ring-page-order and max-ring-pages properties so we have to default to a minimum amount of 1 ring page. Noticed and fix tested by reyk@ on EC2.
-rw-r--r--sys/dev/pv/xbf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c
index b5229de38a4..ef3b454fba2 100644
--- a/sys/dev/pv/xbf.c
+++ b/sys/dev/pv/xbf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xbf.c,v 1.2 2016/12/07 18:33:45 mikeb Exp $ */
+/* $OpenBSD: xbf.c,v 1.3 2016/12/07 19:17:52 mikeb Exp $ */
/*
* Copyright (c) 2016 Mike Belopuhov
@@ -767,8 +767,9 @@ xbf_init(struct xbf_softc *sc)
if (error == 0)
sc->sc_xr_size = res;
}
+ /* Fallback to the known minimum */
if (error)
- goto errout;
+ sc->sc_xr_size = XBF_MIN_RING_SIZE;
if (sc->sc_xr_size < XBF_MIN_RING_SIZE)
sc->sc_xr_size = XBF_MIN_RING_SIZE;