diff options
author | 2014-07-10 11:15:52 +0000 | |
---|---|---|
committer | 2014-07-10 11:15:52 +0000 | |
commit | b2b5ee827b681cbd4dcfeb8ae01130e5e695d11e (patch) | |
tree | 62a9b3ea5fd368ae8326fe58cf6ca09f7e677515 | |
parent | Move games files and subdirs to the game set. (diff) | |
download | wireguard-openbsd-b2b5ee827b681cbd4dcfeb8ae01130e5e695d11e.tar.xz wireguard-openbsd-b2b5ee827b681cbd4dcfeb8ae01130e5e695d11e.zip |
record the size of the rx rings so we can wrap around them correctly.
fixes a panic, reported by paul de weerd.
-rw-r--r-- | sys/dev/pci/if_vic.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c index 649a25eee29..5e7fa4d1ad5 100644 --- a/sys/dev/pci/if_vic.c +++ b/sys/dev/pci/if_vic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vic.c,v 1.78 2014/07/08 05:35:19 dlg Exp $ */ +/* $OpenBSD: if_vic.c,v 1.79 2014/07/10 11:15:52 dlg Exp $ */ /* * Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org> @@ -605,6 +605,7 @@ vic_alloc_data(struct vic_softc *sc) for (q = 0; q < VIC_NRXRINGS; q++) { sc->sc_rxq[q].slots = (struct vic_rxdesc *)&kva[offset]; sc->sc_data->vd_rx_offset[q] = offset; + sc->sc_data->vd_rx[q].length = sc->sc_nrxbuf; for (i = 0; i < sc->sc_nrxbuf; i++) { rxd = &sc->sc_rxq[q].slots[i]; |