Skip to content

Navigation Menu

Sign in
Sign up

Now MAC filter deny is supported. (Only accept was supported.) - #43

Open
zaibaq wants to merge 1 commit into
garywill:master from
zaibaq:master
Open

Now MAC filter deny is supported. (Only accept was supported.) #43
zaibaq wants to merge 1 commit into
garywill:master from
zaibaq:master

Conversation

@zaibaq

@zaibaq zaibaq commented Sep 23, 2022

Copy link
Copy Markdown

This is to support --mac-filter-deny after only --mac-filter-accept was supported.

Use:
If you want to use deny acl, use the option --mac-filter-deny. Similarly for accept acl, use --mac-filter-accept.
Obviously, you cannot use both options at the same time.
If you want to set a specific path for the mac addresses file, whether you're using deny or accept, you need to set the option --mac-filter-file <MAC_ADDRESSES_FILE>.

zaibaq force-pushed the master branch 2 times, most recently from 02a153b to ee858a8 Compare September 23, 2022 19:00

zaibaq commented Oct 3, 2022

Copy link
Copy Markdown
Author

Any updates regarding this? @garywill

garywill commented Oct 4, 2022

Copy link
Copy Markdown
Owner

Hi, @zaibaq .
Thank you for sending PR to us.

Your commit has 300+ lines changes, which is too hard for us to review.
Please make a freshnew commit (based on the latest commit in master branch) containing only the feature part. Ignore those blanks, exclude them from commit.

You can use some GUI tool to choose lines to put into a commit, like git gui, gitg, git-cola`

Comment thread lnxrouter
WIFI_IFACE=
CHANNEL=default
WPA_VERSION=2
MAC_FILTER=0

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're changing the meaning of this variable (from "enable mac filter or not" to "macaddr_acl in hostapd.conf" ),
we should use a new variable name MACADDR_ACL

Comment thread lnxrouter
CHANNEL=default
WPA_VERSION=2
MAC_FILTER=0
MAC_FILTER=3 # 3 is not valid

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave it blank (or use -1 or -99) is better. hostapd may add 3 as a valid value in the future

Comment thread lnxrouter
shift
if [ "$MAC_FILTER_TYPE" == "deny" ]
then
printf "ERROR: Can't use --mac-filter-accept and --mac-filter-deny together.\n"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need >&2

Comment thread lnxrouter
--mac-filter-deny)
shift
MAC_FILTER_ACCEPT="1ドル"
if [ "$MAC_FILTER_TYPE" == "accept" ]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable MAC_FILTER_TYPE would be unnecessary. Use that MACADDR_ACL

Comment thread lnxrouter
if [[ $MAC_FILTER -eq 0 ]]; then
cat <<- EOF >> "$CONFDIR/hostapd.conf"
macaddr_acl=0
deny_mac_file=${MAC_FILTER_FILE}

@garywill garywill Oct 15, 2022
edited
Loading

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking ...
maybe we can make the script option like this:

--mac-filter-accept <accept_file>
--mac-filter-deny <deny_file>

then variable MAC_FILTER_FILE and option --mac-filter-file would be unnecessary .

--mac-filter-accept - will apply the default path /etc/hostapd/hostapd.accept.
--mac-filter-deny - similar to above

What do you think?

0n1cOn3 reacted with laugh emoji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@garywill garywill garywill requested changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /