fix regex expression to find IPV4 address 00/73800/2
authorLuc Provoost <luc.provoost@gmail.com>
Sun, 8 Jan 2023 12:18:29 +0000 (13:18 +0100)
committerLuc Provoost <luc.provoost@gmail.com>
Mon, 9 Jan 2023 10:06:50 +0000 (10:06 +0000)
helper.lua contains code to parse the IP addresses in the parameters.lua
file. The regular expression to find the IPV4 address is fixed.

Signed-off-by: Luc Provoost <luc.provoost@gmail.com>
Change-Id: I9baf2b059fa281dc408bd0ea59b77d294750c1ef

VNFs/DPPD-PROX/helper-scripts/rapid/helper.lua

index 1b4c657..a563340 100644 (file)
@@ -21,7 +21,7 @@ function convertIPToHex(ip)
     return "IP ADDRESS ERROR"
   end
 
-  local chunks = {ip:match("^(%d+)%.(%d+)%.(%d+)%.(%d+)(\/%d+)$")}
+  local chunks = {ip:match("^(%d+)%.(%d+)%.(%d+)%.(%d+)(/%d+)$")}
   if #chunks == 5 then
     for i,v in ipairs(chunks) do
       if i < 5 then