PyFRC2G icon indicating copy to clipboard operation
PyFRC2G copied to clipboard

Interface address

Open olivierb46 opened this issue 11 months ago • 3 comments

When a rule targets one of the gateway addresses, the script sets the destination to interface:ip. For example:

  • lan:ip instead of LAN Address
  • opt1:ip instead of DMZ Address

olivierb46 avatar Dec 14 '25 20:12 olivierb46

The Problem

When a rule targets a gateway address in the format interface:ip (for example, lan:ip or opt1:ip), the script only displays the interface name (like "LAN" or "DMZ") instead of the full address name (such as "LAN Address" or "DMZ Address"). The Solution

I will modify the map_value function in modules/utils.py to:

Detect the pattern interface:ip (for example, lan:ip, opt1:ip)
Extract the interface name (e.g., lan from lan:ip)
Look up the interface description in the API's interface map
Return the address name in the format "{Interface Description} Address"

Example Results

lan:ip → "LAN Address" (if lan corresponds to "LAN")
opt1:ip → "DMZ Address" (if opt1 corresponds to "DMZ")

GuyGuy-59 avatar Dec 27 '25 17:12 GuyGuy-59

Thanks Guyguy-59. I was also thinking of that solution.

olivierb46 avatar Dec 29 '25 07:12 olivierb46

And it works ! Thanks again ;)

PS : how can i contact you ?

olivierb46 avatar Dec 29 '25 19:12 olivierb46