Comments you submit will be routed for moderation. If you have an account, please log in first.

Ticket #123 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

"/usr/sbin/luci-splash list" exception on whitelist entry

Reported by: reporter Owned by:
Priority: major Milestone: LuCI 0.9.0
Component: LuCI Applications Keywords: luci-splash
Cc:

Description

Hi!

I have an entry in the luci-splash whitelist (done via web interface).

root@Abraxas1:/etc# /usr/sbin/luci-splash list
MAC IP State Dur. Intf. Traffic down/up
/usr/bin/lua: /usr/sbin/luci-splash:430: attempt to call method 'lower' (a nil value)
stack traceback:

/usr/sbin/luci-splash:430: in function 'list'
/usr/sbin/luci-splash:128: in function 'main'
/usr/sbin/luci-splash:441: in main chunk
[C]: ?

Looks like

430: local arp = arpcache[mac]:lower()

the :lower() needs to be removed as arpcache[mac] returns an array.
I'm not a Lua-coder, though, so bear with me. After the change, I see:

root@Abraxas1:/etc# /usr/sbin/luci-splash list
MAC IP State Dur. Intf. Traffic down/up
00:1e:c2:bd:d3:e5 172.16.99.16 whitelist - wl0 - -

Greetings,

Dirk

Attachments

Change History

follow-up: ↓ 2   Changed 3 years ago by reporter

The lower formatting can be re-added in the print statement below:

                        print(string.format(
                                "%-17s  %-15s  %-9s  %4s  %-7s  %9s  %9s",
                                mac, arp and arp[2]:lower() or "?", s[".type"], "- ",
                                arp and arp[1]:lower() or "?", "-", "-"
                        ))

in reply to: ↑ 1   Changed 3 years ago by ben

  • status changed from new to closed
  • resolution set to fixed

Corrected in r6048, thanks for the code snippets.

--
Benoît Knecht

Add/Change #123 ("/usr/sbin/luci-splash list" exception on whitelist entry)

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
The resolution will be deleted. Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.