<html>
    <head>
      <base href="https://bugzilla.netfilter.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - 'list ruleset' of 'nft -f' outputs garbage while 'nft list ruleset' seems to work."
   href="https://bugzilla.netfilter.org/show_bug.cgi?id=1195">1195</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>'list ruleset' of 'nft -f' outputs garbage while 'nft list ruleset' seems to work.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>nftables
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86_64
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P5
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>nft
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>pablo@netfilter.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>slyfox@inbox.ru
          </td>
        </tr></table>
      <p>
        <div>
        <pre># This report is a valid nft file.
# $ uname -r
#   4.14.0-rc5-00009-g3728e6a255b5

# run as: 'nft -f nft.bug'

# This will output:
# table inet filter {
#         chain local-input {
#                 iifname "lo" meta nfproto ipv4 payload @nh,96,64
0x7f0000017f000001 [invalid type] ip protocol udp counter packets 0 bytes 0
accept
#         }
# }

# While when we run 'list ruleset' right afterwards decoding is fine:

# table inet filter {
#         chain local-input {
#                 iifname "lo" ip saddr 127.0.0.1 ip daddr 127.0.0.1 ip
protocol udp counter packets 0 bytes 0 accept
#         }
# }

# Note 'payload @nh,96,64 0x7f0000017f000001 [invalid type]' dump. Looks like
decoding is slightly off.


# flush old state
flush ruleset

# filters
table inet filter {
    # in real code there is a reference to this chain
    chain local-input {
        iifname "lo" ip saddr 127.0.0.1 ip daddr 127.0.0.1 ip protocol udp
counter accept
    }
}

# dump new state
list ruleset</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>