diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2021-08-25 15:24:42 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2021-08-25 15:24:42 +0200 |
| commit | dbb91282fa488964fb20595f9494a9f0e4f36a58 (patch) | |
| tree | 142bc942e5320b35514cdf03a5f9f47a9b89df0e /src/core/nm-firewall-utils.c | |
| parent | 5f2ede3a2813b0e9204befdcfc67509d34be71c6 (diff) | |
| parent | cfb80376641fa49137b9996130352697e7f8b436 (diff) | |
Update upstream source from tag 'upstream/1.32.10'
Update to upstream version '1.32.10' with Debian dir fcf2778b50b013ede3e7375bc1d829e984175658
Diffstat (limited to 'src/core/nm-firewall-utils.c')
| -rw-r--r-- | src/core/nm-firewall-utils.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/core/nm-firewall-utils.c b/src/core/nm-firewall-utils.c index 3f225156..a2446553 100644 --- a/src/core/nm-firewall-utils.c +++ b/src/core/nm-firewall-utils.c @@ -613,17 +613,17 @@ _fw_nft_set(gboolean add, const char *ip_iface, in_addr_t addr, guint8 plen) #define _append(p_strbuf, fmt, ...) nm_str_buf_append_printf((p_strbuf), "" fmt "\n", ##__VA_ARGS__) - _append(&strbuf, "add table inet %s", table_name); - _append(&strbuf, "%s table inet %s", add ? "flush" : "delete", table_name); + _append(&strbuf, "add table ip %s", table_name); + _append(&strbuf, "%s table ip %s", add ? "flush" : "delete", table_name); if (add) { _append(&strbuf, - "add chain inet %s nat_postrouting {" + "add chain ip %s nat_postrouting {" " type nat hook postrouting priority 100; policy accept; " "};", table_name); _append(&strbuf, - "add rule inet %s nat_postrouting ip saddr %s ip daddr != %s masquerade;", + "add rule ip %s nat_postrouting ip saddr %s ip daddr != %s masquerade;", table_name, str_subnet, str_subnet); @@ -634,41 +634,41 @@ _fw_nft_set(gboolean add, const char *ip_iface, in_addr_t addr, guint8 plen) */ /* _append(&strbuf, - "add chain inet %s filter_input {" + "add chain ip %s filter_input {" " type filter hook input priority 0; policy accept; " "};", table_name); - _append(&strbuf, "add rule inet %s filter_input tcp dport { 67, 53 } accept;", table_name); - _append(&strbuf, "add rule inet %s filter_input udp dport { 67, 53 } accept;", table_name); + _append(&strbuf, "add rule ip %s filter_input tcp dport { 67, 53 } accept;", table_name); + _append(&strbuf, "add rule ip %s filter_input udp dport { 67, 53 } accept;", table_name); */ _append(&strbuf, - "add chain inet %s filter_forward {" + "add chain ip %s filter_forward {" " type filter hook forward priority 0; policy accept; " "};", table_name); _append(&strbuf, - "add rule inet %s filter_forward ip daddr %s oifname \"%s\" " + "add rule ip %s filter_forward ip daddr %s oifname \"%s\" " " ct state { established, related } accept;", table_name, str_subnet, ip_iface); _append(&strbuf, - "add rule inet %s filter_forward ip saddr %s iifname \"%s\" accept;", + "add rule ip %s filter_forward ip saddr %s iifname \"%s\" accept;", table_name, str_subnet, ip_iface); _append(&strbuf, - "add rule inet %s filter_forward iifname \"%s\" oifname \"%s\" accept;", + "add rule ip %s filter_forward iifname \"%s\" oifname \"%s\" accept;", table_name, ip_iface, ip_iface); _append(&strbuf, - "add rule inet %s filter_forward iifname \"%s\" reject;", + "add rule ip %s filter_forward iifname \"%s\" reject;", table_name, ip_iface); _append(&strbuf, - "add rule inet %s filter_forward oifname \"%s\" reject;", + "add rule ip %s filter_forward oifname \"%s\" reject;", table_name, ip_iface); } |