Skip to content

Commit

Permalink
Merge pull request #164 from dave14305/localnames
Browse files Browse the repository at this point in the history
Prevent wrong client name in Get_LocalName()
  • Loading branch information
Adamm00 authored Feb 17, 2025
2 parents 381d18f + 02fe5db commit b388084
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion firewall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,8 @@ Download_File() {
}

Get_LocalName() {
localname="$(nvram get custom_clientlist | grep -ioE "<.*>$macaddr" | sed -E 's/.*<([^>]+)>[^<]*$/\1/; s/[^a-zA-Z0-9.-]//g')"
localname=""
if [ -n "$macaddr" ]; then localname="$(nvram get custom_clientlist | grep -ioE "<.*>$macaddr" | sed -E 's/.*<([^>]+)>[^<]*$/\1/; s/[^a-zA-Z0-9.-]//g')"; fi
if [ -z "$localname" ]; then localname="$(grep -F "$ipaddr " /var/lib/misc/dnsmasq.leases | awk '{print $4}')"; fi
if [ -z "$localname" ] || [ "$localname" = "*" ]; then
if [ -n "$macaddr" ]; then
Expand Down

1 comment on commit b388084

@KamilBednarczykIntel
Copy link

Choose a reason for hiding this comment

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

Change without version bump... you gave me a heart attack ;). Amtm auto update reported SHA change... I thought someone broke into my router

Please sign in to comment.