summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormglocker <mglocker@openbsd.org>2019-01-29 18:25:26 +0000
committermglocker <mglocker@openbsd.org>2019-01-29 18:25:26 +0000
commit3fc2da624df2908f996e38e226e1700d9f1ab7ca (patch)
tree4722e2fdf3be74aa584609f47c1142492f5336f8
parentPlumbing to simplify upcoming locking. (diff)
downloadwireguard-openbsd-3fc2da624df2908f996e38e226e1700d9f1ab7ca.tar.xz
wireguard-openbsd-3fc2da624df2908f996e38e226e1700d9f1ab7ca.zip
Discard unwanted mouse events from the keyboard input channel when we're
on the console. Issue reported by deraadt@. ok deraadt@, mpi@
-rw-r--r--sys/dev/ic/pckbc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/ic/pckbc.c b/sys/dev/ic/pckbc.c
index ab63d70946c..131192585fc 100644
--- a/sys/dev/ic/pckbc.c
+++ b/sys/dev/ic/pckbc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pckbc.c,v 1.50 2017/03/11 11:55:03 mpi Exp $ */
+/* $OpenBSD: pckbc.c,v 1.51 2019/01/29 18:25:26 mglocker Exp $ */
/* $NetBSD: pckbc.c,v 1.5 2000/06/09 04:58:35 soda Exp $ */
/*
@@ -161,6 +161,9 @@ pckbc_poll_data1(bus_space_tag_t iot, bus_space_handle_t ioh_d,
if (slot == PCKBC_AUX_SLOT) {
DPRINTF("lost kbd 0x%x\n", c);
continue;
+ } else if (stat & KBS_AUXDATA) {
+ DPRINTF("discard aux data 0x%x\n", c);
+ continue;
}
}
return (c);