<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 - Inconsistent EBUSY errors when adding a duplicate element to a map"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1413">1413</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Inconsistent EBUSY errors when adding a duplicate element to a map
</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>Debian GNU/Linux
</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>kernel
</td>
</tr>
<tr>
<th>Assignee</th>
<td>pablo@netfilter.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>anton.aksola@upcloud.com
</td>
</tr></table>
<p>
<div>
<pre>OS: Debian GNU/Linux 10 (Buster)
Kernel: 4.19.0-8-amd64
This works every time:
# nft -f - << EOF
flush ruleset
add table ip filter
add chain ip filter forward { type filter hook forward priority 0; policy
accept; }
add map ip filter foo { type ifname : verdict; }
add rule ip filter forward iifname vmap @foo
add element ip filter foo { "dummy0" : accept }
add element ip filter foo { "dummy0" : accept }
EOF
While these do not:
# nft -f - << EOF
flush ruleset
add table ip filter
add chain ip filter forward { type filter hook forward priority 0; policy
accept; }
add map ip filter foo { type ifname : verdict; }
add rule ip filter forward iifname vmap @foo
add element ip filter foo { "dummy0" : accept }
add element ip filter foo { "dummy0" : drop }
EOF
/dev/stdin:7:1-42: Error: Could not process rule: Device or resource busy
add element ip filter foo { "dummy0" : drop }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# nft -f - << EOF
flush ruleset
add table ip filter
add chain ip filter forward { type filter hook forward priority 0; policy
accept; }
add map ip filter foo { type ifname : verdict; }
add rule ip filter forward iifname vmap @foo
add element ip filter foo { "dummy0" : accept }
add set ip filter prefixset { type ipv4_addr; flags interval; }
add element ip filter foo { "dummy0" : accept }
EOF
/dev/stdin:8:1-44: Error: Could not process rule: Device or resource busy
add element ip filter foo { "dummy0" : accept }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I couldn't find any references how maps should behave when adding a duplicate
element. In any case a consistent behaviour would be desirable.
Looking at the strace output this error seems to come from the kernel so filing
this under it.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>