Skip to content
Snippets Groups Projects
Commit e1e66bd0 authored by Robert Martin-Legene's avatar Robert Martin-Legene
Browse files

Removing [] around IPv6 addresses in lastseen/

parent 0073738c
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,11 @@ do
echo "$remoteaddress" |
sed 's/:[0-9][0-9]*$//'
)
# IPv6 has the address surrounded by [ and ] - we strip that away
if [ "${remoteip:0:1}" = "[" -a "${remoteip:$((${#remoteip}-1))}" = "]" ]
then
remoteip="${remoteip:1:$((${#remoteip}-2))}"
fi
remoteport=$(
echo "$remoteaddress" |
sed 's/^.*://'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment