[Bug 1253] interface wildcard in variables causes Error: Byteorder mismatch: expected big endian, got host endian

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Fri Jul 12 13:16:22 CEST 2019


https://bugzilla.netfilter.org/show_bug.cgi?id=1253

Florian Westphal <fw at strlen.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fw at strlen.de

--- Comment #1 from Florian Westphal <fw at strlen.de> ---
(In reply to Ian Kumlien from comment #0)
> if you do:
> define $interfaces = {
>   tun*,
>   lo
> }
> 
> and then using that variable:
> iifname $interfaces accept
> 
> results in:
> Error: Byteorder mismatch: expected big endian, got host endian

Yes, problem is that
iifname { "tun*", "lo" }

cotains a "*".

> but if i do:
> iifname tun* accept
> 
> it works.

Yes, in this case we just do "iifname tun", with the difference that we compare
3 bytes instead of 4 (with a \0 character).

For the lookup case, we can't do it, as no cmp happens, we instead pass
the interface name as key to the set lookup function, i.e. the "*" will never
match, as we can't know that we only should lookup "tun", not e.g. "tun0" or
"veth1".

So, its likely we need to present a better error message rather than this
obscure followup error.

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20190712/19481a4e/attachment.html>


More information about the netfilter-buglog mailing list