<html>
    <head>
      <base href="https://bugzilla.netfilter.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:phil@nwl.cc" title="Phil Sutter <phil@nwl.cc>"> <span class="fn">Phil Sutter</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - Cannot parse negative priorities from command line"
   href="https://bugzilla.netfilter.org/show_bug.cgi?id=1083">bug 1083</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>phil@nwl.cc
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>WONTFIX
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - Cannot parse negative priorities from command line"
   href="https://bugzilla.netfilter.org/show_bug.cgi?id=1083#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - Cannot parse negative priorities from command line"
   href="https://bugzilla.netfilter.org/show_bug.cgi?id=1083">bug 1083</a>
              from <span class="vcard"><a class="email" href="mailto:phil@nwl.cc" title="Phil Sutter <phil@nwl.cc>"> <span class="fn">Phil Sutter</span></a>
</span></b>
        <pre>This happens due to how nft parses commandline options:
- First, getopt_long() is called (in main.c).
- Then, lex/yacc parses whatever remains.

The leading dash of the negative priority value is picked up by getopt, which
obviously rejects it. I think this neither can nor should be "solved".

Instead, here are two ways how to achieve what you want to do:

1) quote the whole part in curly braces (I usually do that to avoid the shell
picking up the braces by accident:

nft add chain nat prerouting '{ type nat hook prerouting priority -150; }'

2) Use '--' parameter to tell getopt it shall not parse beyond that:

nft -- add chain nat prerouting { type nat hook prerouting priority -150\; }

Since I don't think any workaround in nft is feasible (and good ways to work
around this issue exist), I'm closing this ticket. If you still think this is
an absolute must-have for you, please feel free to reopen.

Cheers, Phil</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>