<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 - Error: Hostname resolves to multiple addresses"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1309">1309</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Error: Hostname resolves to multiple addresses
</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>netfilter.moschroe@xoxy.net
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=551" name="attach_551" title="minimal nftables ruleset producing the issue">attachment 551</a> <a href="attachment.cgi?id=551&action=edit" title="minimal nftables ruleset producing the issue">[details]</a></span>
minimal nftables ruleset producing the issue
Overview:
Unable to define rules applying to runtime-resolved hostnames when said
hostnames resolve to multiple ip addresses. This is a major impediment to
adopting nftables at our site.
Steps to Reproduce:
1. Define a ruleset depending on an affected hostname, like the attached
sample.nft.
2. Run nft check command like so:
------
execution of nft command:
$ nft -c -f sample.nft
Actual Results:
sample.nft:5:18-37: Error: Hostname resolves to multiple addresses
ip daddr "archive.ubuntu.com" accept
^^^^^^^^^^^^^^^^^^^^
------
The command exits with code 1.
Expected Results:
1. If at the particular point only a single result would be valid, then a
suggestion should be made to refactor to using a set.
2. It ought to be possible to define such a set of type ipv4_addr (or
ipv6_addr) from resolving one or more hostnames, either ad hoc or named.
A hostname not resolving into an IP of the appropriate type (A/AAAA) should
not lead to an error and instead produce an empty set.
Examples:
1. ip daddr {"archive.ubuntu.com"} accept
2. #!/usr/sbin/nft -f
table inet firewall {
set testset { type ipv4_addr; elements = { "archive.ubuntu.com" }}
chain out {
type filter hook output priority 0; policy drop;
ip daddr @testset accept
}
}
Version:
$ nft --version
nftables v0.9.0 (Fearless Fosdick)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>