Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
utils: suppress errors on missing legacy iptables
When the legacy iptables backend is not installed, iptables-legacy-save and ip6tables-legacy-save binary files are missing and this results in the following error messages: (00.062021) iptables has nft backend: iptables-save v1.8.8 (nf_tables) Error (criu/util.c:626): execvp("iptables-legacy-save", ...) failed: No such file or directory (00.062793) Error (criu/util.c:641): exited, status=1 (00.062800) Error (criu/util.c:1566): iptables-legacy-save -V failed (00.069758) iptables has nft backend: ip6tables-save v1.8.8 (nf_tables) Error (criu/util.c:626): execvp("ip6tables-legacy-save", ...) failed: No such file or directory (00.070615) Error (criu/util.c:641): exited, status=1 (00.070624) Error (criu/util.c:1566): ip6tables-legacy-save -V failed (00.070632) skipping iptables dump - no legacy version present (00.070635) skipping ip6tables dump - no legacy version present The error messages "No such file or directory" can be ignored. This patch updates the get_legacy_iptables_bin() to check if the /proc/net/ip(6)_tables_names file is empty before trying to run iptables-legacy. Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
- Loading branch information