Carlos E. R. wrote:
On 2023-04-30 17:44, Dave Howorth wrote:
On Sun, 30 Apr 2023 16:15:14 +0200 Per Jessen <per@opensuse.org> wrote:
Carlos E. R. wrote:
The line that triggers the error is commented out!
No they are not. Those hashes don't do what you expect. They are in a string spanning multiple lines, with continuation characters.
Interesting question of language design. Is there a separate pre-process pass for comments et al, or does the whole parser run as integrated unit? :)
I know that the syntax seems weird, but AFAIR SuSEfirewall2 worked with that just fine.
It probably did, even if it may not have done what you expected. I guess you can check one of your yet-to-be-migrated machines. I expect you'll find an iptables rule that permits that port range. SuSEfirewall2 was/is just a bash script for generating iptables statements based on the variable-based config in /etc/sysconfig/SuSEfirewall2 . Bash is a lot of things, but it is hardly capable of building sophisticated text parsers. If you glance at the code, you'll quickly see it works with blanks and commas, as separators.
It also accepted the syntax of the port range like this: 192.168.1.126,tcp,30000:30100 which the conversion script rejects.
The port syntax of "30000:30100" is perfectly valid for iptables, for specifying a port range. The conversion script is apparently being a little more strict with the parsing. -- Per Jessen, Zürich (15.0°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes