小编Kar*_*hik的帖子

如何抑制所有被视为格式截断错误的警告

我正在尝试使用 gcc 8.3.0 构建我的源代码

root@eqx-sjc-engine2-staging:/usr/local/src# gcc --version
gcc (Debian 8.3.0-2) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@eqx-sjc-engine2-staging:/usr/local/src# 
Run Code Online (Sandbox Code Playgroud)

我收到以下错误

libs/esl/fs_cli.c:1679:43: error: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1020 [-Werror=format-truncation=]
   snprintf(cmd_str, sizeof(cmd_str), "api %s\nconsole_execute: true\n\n", argv_command);    
libs/esl/fs_cli.c:1679:3: note: 'snprintf' output between 29 and 1052 bytes into …
Run Code Online (Sandbox Code Playgroud)

linux make gcc

5
推荐指数
1
解决办法
1万
查看次数

Debian buster/sid 中​​的 ip6table-restore 失败

我有以下 iptable 规则/etc/iptables/rule.V6/etc/iptables/rule.V4

-4 -A INPUT -p icmp -j ACCEPT
-6 -A INPUT -p ipv6-icmp -j ACCEPT
Run Code Online (Sandbox Code Playgroud)

当我尝试重新启动 时netfilter-persistent,它在内部调用iptables-restoreip6tables-restore

ip6tables-restore 失败,因为它无法理解以下规则

-4 -A INPUT -p icmp -j ACCEPT
Run Code Online (Sandbox Code Playgroud)

下面是错误

root@rs-dal:/etc/iptables# ip6tables-restore rules.q
Error occurred at line: 15
Try `ip6tables-restore -h' or 'ip6tables-restore --help' for more information.
Run Code Online (Sandbox Code Playgroud)

理想情况下,开头的规则-4将被 忽略ip6tables-restore,但这似乎不适用于 Debian Buster。

但是,iptables-restore工作正常,这只是ip6tables-restore. 如何解决这个问题?

debian iptables ip6tables nftables

4
推荐指数
1
解决办法
3171
查看次数

标签 统计

debian ×1

gcc ×1

ip6tables ×1

iptables ×1

linux ×1

make ×1

nftables ×1