Re: iptables 1.8.10 translate error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 28, 2024 at 08:27:13AM -0400, imnozi@xxxxxxxxx wrote:
> Ah. Does iptables now auto-insert a space between the prefix and the message? 1.6.0 didn't, which is why I added those spaces years ago.
> 
> But then, how does iptables-translate grouse about the '"' being a bad arg if the shell strips the quotes out?

It's the other way round: You're capturing the quotes in $a so the shell
will pass them to the command after expanding the variable reference.

[...]
> > > [root@kvm64-62 sbin]# iptables-save|grep -- "^-.*LOG" |while read a; do echo -e "\n$a"; iptables-translate $a;done

Your test-script is simply broken. Instead of 'iptables-translate $a',
call 'eval "iptables-translate $a"' and everything's fine. You did not
try calling iptables-translate with given parameters manually, did you?

Please keep in mind that the first step after writing a test script is
to debug the test script itself.

Cheers, Phil




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux