<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 - nft -o optimizer fails to optimize birmasks"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1784">1784</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>nft -o optimizer fails to optimize birmasks
</td>
</tr>
<tr>
<th>Product</th>
<td>nftables
</td>
</tr>
<tr>
<th>Version</th>
<td>1.0.x
</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>normal
</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>neandris@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>Lets feed following table (borrowed from tcp conntrack valid flags)
table inet t {
chain c {
tcp flags syn / fin,syn,rst,ack,urg
tcp flags syn,urg / fin,syn,rst,ack,urg
tcp flags syn,ack / fin,syn,rst,ack,urg
tcp flags rst / fin,syn,rst,ack,urg
tcp flags rst,ack / fin,syn,rst,ack,urg
tcp flags fin,ack / fin,syn,rst,ack,urg
tcp flags fin,ack,urg / fin,syn,rst,ack,urg
tcp flags ack / fin,syn,rst,ack,urg
tcp flags ack,urg / fin,syn,rst,ack,urg
}
}
Outcome
Merging:
/dev/stdin:3:3-37: tcp flags syn / fin,syn,rst,ack,urg
/dev/stdin:4:3-41: tcp flags syn,urg / fin,syn,rst,ack,urg
/dev/stdin:5:3-41: tcp flags syn,ack / fin,syn,rst,ack,urg
/dev/stdin:6:3-37: tcp flags rst / fin,syn,rst,ack,urg
/dev/stdin:7:3-41: tcp flags rst,ack / fin,syn,rst,ack,urg
/dev/stdin:8:3-41: tcp flags fin,ack / fin,syn,rst,ack,urg
/dev/stdin:9:3-45: tcp flags fin,ack,urg / fin,syn,rst,ack,urg
/dev/stdin:10:3-37: tcp flags ack / fin,syn,rst,ack,urg
/dev/stdin:11:3-41: tcp flags ack,urg / fin,syn,rst,ack,urg
into:
tcp flags syn / { fin,syn,rst,ack,urg, fin,syn,rst,ack,urg,
fin,syn,rst,ack,urg, fin,syn,rst,ack,urg, fin,syn,rst,ack,urg,
fin,syn,rst,ack,urg, fin,syn,rst,ack,urg, fin,syn,rst,ack,urg,
fin,syn,rst,ack,urg }
/dev/stdin:3:3-11: Error: Binary operation (&) is undefined for set expressions
tcp flags syn / fin,syn,rst,ack,urg
^^^^^^^^^~~~~~~~~~~~~~~~~~~~~~~~~~~
Expected - futile optimisation is not attempted. or skipped with warning
keeping original ruleset, or some syntax enhancement to make a set of comma
separated value groups (neither hex values work here) separated by commas /
mask.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>