From cf910946b873cb98f3546015889ddbccc0e62418 Mon Sep 17 00:00:00 2001 From: rpm-build Date: Dec 09 2020 08:46:57 +0000 Subject: 0001-HOGP-must-only-accept-data-from-bonded-devices.patch patch_name: 0001-HOGP-must-only-accept-data-from-bonded-devices.patch present_in_specfile: true location_in_specfile: 8 --- diff --git a/profiles/input/hog.c b/profiles/input/hog.c index 83c017d..dfac689 100644 --- a/profiles/input/hog.c +++ b/profiles/input/hog.c @@ -186,6 +186,10 @@ static int hog_accept(struct btd_service *service) return -EINVAL; } + /* HOGP 1.0 Section 6.1 requires bonding */ + if (!device_is_bonded(device, btd_device_get_bdaddr_type(device))) + return -ECONNREFUSED; + /* TODO: Replace GAttrib with bt_gatt_client */ bt_hog_attach(dev->hog, attrib);