NFTABLES : on passe par la case COMPIL

Les tests de "map" et autres joyeusetés n'ayant pas fonctionné avec les versions "standard" des ^packages, il faut passer par la case "compil" et récupérer les morceaux dans un petit répertoire bien tranquille (pour moi "/usr/src/PGM/BUILD/NFT"): 
git clone git://git.netfilter.org/nftables.git 
git clone git://git.netfilter.org/libmnl.git 
git clone git://git.netfilter.org/libnftnl.git 

Pré-requis : 
bison 
flex 
libgmp-dev 
libreadline-dev 
libmnl0 
libmnl-dev 
Remarque : il peut y avoir d'autres pré-requis, la machine ayant servi à la compil est une Debian "stable" avec "backports" qui a déjà beaucoup vécu et comporte déjà pas mal de packages "-dev".

Compilation de "LIBMNL" le script :

#!/bin/bash

cd NFT/libmnl ...... le répertoire source 
zzz=$(pwd) 
yyy=$(basename $zzz) 
case $yyy in 
    libmnl)        echo 'OK' 
            ;; 
    *)        echo 'pas dans libmnl' 
            exit 
            ;; 
esac

make clean

./autogen.sh

# configure libmnl 
CONFOPT=" --prefix=/usr/local/libmnl --exec-prefix=/usr/local/libmnl "

./configure ${CONFOPT} 2>&1 | tee LOG.CONF

make 2>&1 | tee LOG.MAKE

Ne pas oublier ensuite (en "root") le "make install". 

Compilation de "LIBNFTNL" le script :

#!/bin/bash

cd NFT/libnftnl 
zzz=$(pwd) 
yyy=$(basename $zzz) 
case $yyy in 
    libnftnl)        echo 'OK' 
            ;; 
    *)        echo 'pas dans libnftnl' 
            exit 
            ;; 
esac

make clean

./autogen.sh

# configure libnftnl 
CONFOPT=" --prefix=/usr/local/libnftnl --exec-prefix=/usr/local/libnftnl " 
CONFOPT=${CONFOPT}' LIBMNL_LIBS=/usr/local/libmnl ' 
CONFOPT=${CONFOPT}' LIBMNL_CFLAGS=/usr/local/libmnl'

./configure ${CONFOPT} 2>&1 | tee LOG.CONF

make 2>&1 | tee LOG.MAKE

Ne pas oublier (toujours) le "make install" en "root". 

Une fois tout vérifié j'ai copié : 
/usr/local/libmnl/lib/libmnl.* dans  /lib/x86_64-linux-gnu 
/usr/local/libnftnl/lib/libnftm* dans /lib/x86_64-linux-gnu 

et vérifié que la version Debian de "nft" fonctionnait toujours --> OK 

Compilation de "NFTABLES" le script :

#!/bin/bash

PKG_CONFIG_PATH=${PKG_CONFIG_PATH}':/usr/local/libnftnl/lib/pkgconfig' 
PKG_CONFIG_PATH=${PKG_CONFIG_PATH}':/usr/local/libmnl/lib/pkgconfig' 
export PKG_CONFIG_PATH

cd /usr/src/PGM/BUILD/NFT/nftables 
zzz=$(pwd) 
yyy=$(basename ${zzz}) 
case ${yyy} in 
    nftables)    echo 'OK' 
            ;; 
    *)        echo 'pas dans nftables' 
            exit 
            ;; 
esac

make clean

./autogen.sh

# configure nftables

CONFOPT=' --prefix=/usr/local/nftables --exec-prefix=/usr/local/nftables/bin ' 
CONFOPT=${CONFOPT}' --includedir=/usr/include ' 
CONFOPT=${CONFOPT}' LIBMNL_LIBS=/usr/local/libmnl/lib/libmnl.so  ' 
CONFOPT=${CONFOPT}' LIBNFTNL_LIBS=/usr/local/libnftnl/lib/libnftnl.so  '

./configure ${CONFOPT} 2>&1 | tee LOG.CONFIGURE

make 2>&1 | tee LOG.MAKE

echo 'PKG_CONFIG_PATH=('${PKG_CONFIG_PATH}')'

echo '' >./doc/nft.8

Ne pas oublier (encore) le "make install", puis on expédie "/usr/local/nftables/bin/sbin/nft" dans "/usr/sbin".

On pourra ainsi reprendre nos essais ... avec la dernière version, plus complète.