cgustave / fgtconfig

FortiGate configuration analysis and transformation
10 stars 3 forks source link

Port is lost when the original file has an interface description which is on multiple lines. #6

Open cgustave opened 4 years ago

cgustave commented 4 years ago

Original file: edit "wan1" set vdom "root" set ip 125.17.41.70 255.255.255.252 set allowaccess ping https ssh snmp http fgfm set type physical set description "ILL1_Tejays Industries Dark Fiber " set alias "INTERNET-LINK1" set role wan set snmp-index 3 next

Get's translated in:

    set description "former wan1"

"

The trailing " left on the next line will remain and cause an error in the section and the translated port would be dropped from fortigate. This would then end with en empty port.

Workaround: