Building with a recent clang was failing due to the following error:
src/evaluate.c|450 col 45| error: initializer element is not constant
|| static const unsigned int max_tcpoptlen = 15 * 4 * BITS_PER_BYTE - tcphdrlen;
|| ^~
Signed-off-by: Eric Leblond <eric@regit.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
switch (expr->exthdr.op) {
case NFT_EXTHDR_OP_TCPOPT: {
- static const uint8_t tcphdrlen = 20 * BITS_PER_BYTE;
- static const unsigned int max_tcpoptlen = 15 * 4 * BITS_PER_BYTE - tcphdrlen;
+ static const unsigned int max_tcpoptlen = (15 * 4 - 20) * BITS_PER_BYTE;
unsigned int totlen = 0;
totlen += expr->exthdr.tmpl->offset;