]> git.ipfire.org Git - thirdparty/hostap.git/commit
hostapd: Report error on unknown ACCEPT_ACL/DENY_ACL commands
authorRaphaël Mélotte <raphael.melotte@mind.be>
Wed, 4 Jan 2023 15:53:50 +0000 (16:53 +0100)
committerJouni Malinen <j@w1.fi>
Wed, 1 Feb 2023 16:38:21 +0000 (18:38 +0200)
commit3915e8834eed17d78b70b4a5ab1caee0d1ae09ff
tree66179fbfdd79d57fbd47ce80e8dd4f39b00ba089
parent2cff340d17ba5a2e3dc4ee837b0b1eb0fc12af9d
hostapd: Report error on unknown ACCEPT_ACL/DENY_ACL commands

Currently when using ACCEPT_ACL or DENY_ACL, no error is reported if
the rest of the command is unknown (e.g. 'ACCEPT_ACL FOOBAR' reports
'OK').

On the other hand, hostapd_cli makes it possible to use 'accept_acl'
and 'deny_acl' in lowercase, but the rest of the command (i.e. 'SHOW',
'ADD_MAC', 'CLEAR', etc) must be in uppercase.

As a result, the command 'accept_acl clear' could seem valid when
using hostapd_cli (as it reports 'OK'), while it actually does not do
anything (because 'clear' must be in uppercase).

To let users know whether the command really succeeded or not, report
an error when the command was not understood.

Note that this is also consistent with the way it is currently
implemented in wpa_supplicant.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
hostapd/ctrl_iface.c