You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since version 0.5.0, the "list" function returns an empty list.
This appears to be because the "-n" argument is invalid when used with -S.
For example:
$ iptables -t filter -S INPUT -n
iptables v1.6.1: Illegal option `-n' with this command
Try `iptables -h' or 'iptables --help' for more information.
true => self.get_list(&["-t", table, "-S", chain, "-n"]), from the following code should not contain "-n" in the argument list. The save arguments do not appear to include hostnames in any case.
/// Lists rules in the table/chain.pubfnlist(&self,table:&str,chain:&str) -> Result<Vec<String>,Box<dynError>>{matchself.is_numeric{false => self.get_list(&["-t", table,"-S", chain]),true => self.get_list(&["-t", table,"-S", chain,"-n"]),}}
Suggested solution:
/// Lists rules in the table/chain.pubfnlist(&self,table:&str,chain:&str) -> Result<Vec<String>,Box<dynError>>{self.get_list(&["-t", table,"-S", chain])}
The exists_old_version and list_table functions also appear to have the same issue.
Thank you for this excellent crate!
The text was updated successfully, but these errors were encountered:
Hey,
Since version 0.5.0, the "list" function returns an empty list.
This appears to be because the "-n" argument is invalid when used with -S.
For example:
true => self.get_list(&["-t", table, "-S", chain, "-n"]),
from the following code should not contain "-n" in the argument list. The save arguments do not appear to include hostnames in any case.Suggested solution:
The exists_old_version and list_table functions also appear to have the same issue.
Thank you for this excellent crate!
The text was updated successfully, but these errors were encountered: