Skip to content

Commit

Permalink
[fix] Added ipv6 support to openwisp-get-address #224
Browse files Browse the repository at this point in the history
Fixes #224.
  • Loading branch information
Bartosz-lab authored Oct 23, 2024
1 parent 0967c32 commit c7d973b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openwisp-config/files/sbin/openwisp-get-address.lua
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
local os = require('os')
local net = require('openwisp.net')
local name = arg[1]
local interface = net.get_interface(name)
local interface = net.get_interface(name, 'inet')
if not interface then
interface = net.get_interface(name, 'inet6')
end

if interface then
print(interface.addr)
Expand Down

0 comments on commit c7d973b

Please sign in to comment.