[Bug 1458] New: Consider allowing for variable interpolation

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Fri Aug 28 14:29:35 CEST 2020


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

            Bug ID: 1458
           Summary: Consider allowing for variable interpolation
           Product: nftables
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: nft
          Assignee: pablo at netfilter.org
          Reporter: kfm at plushkava.net

This is another feature request extracted from bug 1434 (the "usability" bug).
Currently, variable interpolation isn't supported by the parser. The originally
given example was as follows.

  define LOG_PREFIX = "[foo] "
  table inet filter {
    chain input {
      type filter hook input priority 0; policy drop;
      counter log prefix "$LOG_PREFIX DROP"
    }
  }

If this is ever implemented, it might also make sense to allow for strings to
be single-quoted so as to be able to suppress expansion (just like in sh).
Otherwise, there would need to be some means of escaping the $ symbol.

Another approach could be so support a concatenation operator instead. For
instance:

  counter log prefix $LOG_PREFIX + " DROP"

-- 
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/20200828/d9bffe92/attachment.html>


More information about the netfilter-buglog mailing list