On Tue, Jun 28, 2022 at 07:13:05PM +0200, Pablo Neira Ayuso wrote: > Hi, > > On Tue, Jun 28, 2022 at 12:23:04AM +0200, Daniel Gröber wrote: > > Currently there is no way to disable searching in DEFAULT_INCLUDE_PATH > > first. This is needed when testing nftables configurations spanning > > multiple files without overwriting the globally installed ones. > > You can do > > # cat x.nft > include "./z.nft" > # cat z.nft > add table x > > then: > > # nft -f x.nft > > using ./ at the beginning of the path overrides DEFAULT_INCLUDE_PATH. Absolute path also overrides DEFAULT_INCLUDE_PATH: # cat x.nft include "/foo/z.nft" search_in_include_path() deals with this in scanner.l. Relative path also overrides DEFAULT_INCLUDE_PATH.