<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 - nftables prints the routing header type rules incorrectly"
   href="https://bugzilla.netfilter.org/show_bug.cgi?id=1219">1219</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>nftables prints the routing header type rules incorrectly
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>All
          </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>amsalam20@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>While I was using nftables to add rules to routing header type 0, I found that
nft list ruleset command prints them incorrectly.

The configuration I was using is shown bellow  

nft add table ip6 filter
nft add chain ip6 filter input { type filter hook input priority 0\;}
nft add  rule ip6 filter input rt0 addr [1]A::2

nft list ruleset

table ip6 filter {
    chain input {
        type filter hook input priority 0; policy accept;
        hbh unknown 0xa0000000000000000000000000002 [invalid type]
    }
}


I'm quite to nftables implementation, but after some walkthrough the code I
think the problem might be as follows: 
 - when we the  struct exthdr_desc for rt0[1], we don't set the type value. 
 - Then allocation function (exthdr_expr_alloc) allocates an HBH header
template since the type value is 0. 

Folks who are more familiar with nftables implementation may have a better
explanation so we can find a fix for the this BUG

[1]<a href="http://git.netfilter.org/nftables/tree/src/exthdr.c#n248">http://git.netfilter.org/nftables/tree/src/exthdr.c#n248</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>