summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_url.c
diff options
context:
space:
mode:
authorjason <jason@openbsd.org>2003-01-27 20:10:52 +0000
committerjason <jason@openbsd.org>2003-01-27 20:10:52 +0000
commitd7e9bd23bce2dfe67eb996abe0bd720fb36feef7 (patch)
tree9b150e144009e64978e6ab2c4c5d1a6b7062e552 /sys/dev/usb/if_url.c
parentpad tx buffer on < minimum length frames; based on NetBSD; tested on hppa. (diff)
downloadwireguard-openbsd-d7e9bd23bce2dfe67eb996abe0bd720fb36feef7.tar.xz
wireguard-openbsd-d7e9bd23bce2dfe67eb996abe0bd720fb36feef7.zip
pad minimum frames with 0's; based on netbsd
Diffstat (limited to 'sys/dev/usb/if_url.c')
-rw-r--r--sys/dev/usb/if_url.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c
index b3d1ffcb782..d5101b95aa0 100644
--- a/sys/dev/usb/if_url.c
+++ b/sys/dev/usb/if_url.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_url.c,v 1.9 2002/11/11 02:32:32 nate Exp $ */
+/* $OpenBSD: if_url.c,v 1.10 2003/01/27 20:10:52 jason Exp $ */
/* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -934,8 +934,10 @@ url_send(struct url_softc *sc, struct mbuf *m, int idx)
c->url_mbuf = m;
total_len = m->m_pkthdr.len;
- if (total_len < URL_MIN_FRAME_LEN)
+ if (total_len < URL_MIN_FRAME_LEN) {
+ bzero(c->url_buf + total_len, URL_MIN_FRAME_LEN - total_len);
total_len = URL_MIN_FRAME_LEN;
+ }
usbd_setup_xfer(c->url_xfer, sc->sc_pipe_tx, c, c->url_buf, total_len,
USBD_FORCE_SHORT_XFER | USBD_NO_COPY,
URL_TX_TIMEOUT, url_txeof);