[Bug 1125] New: Setting bit mark according to result of lookup

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Tue Feb 28 22:15:03 CET 2017


            Bug ID: 1125
           Summary: Setting bit mark according to result of lookup
           Product: nftables
           Version: unspecified
          Hardware: x86_64
                OS: Gentoo
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: nft
          Assignee: pablo at netfilter.org
          Reporter: uzytkownik2 at gmail.com

I tried to set a mark according to interface it come through. My first attempt

table bridge filter {
    map iface_to_mark {
        type iface_index: mark
        elements = {
            iface0: 0x1,
            iface1: 0x2,
    chain input {
        type filter hook input priority 0
        mark set mark or iif map @iface_to_mark

However as RHS of | is not constant it is not allowed. I WAR by vmap jump
depending on interface and inlining constants but it is much less clearer (and
probably much less performant) then simple lookup and or.

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/20170228/fd5fa7af/attachment.html>

More information about the netfilter-buglog mailing list