mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
make: allow setting the default network locking backend
As different Linux distributions are switching away from iptables
to nftables, this makes it easier to compile CRIU with a different
default network locking backend. Instead of changing the source
code it is now possible to select the nft backend like this:
make NETWORK_LOCK_DEFAULT=NETWORK_LOCK_NFTABLES
Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
parent
720bf67e06
commit
867c773031
2 changed files with 12 additions and 0 deletions
4
Makefile
4
Makefile
|
|
@ -140,6 +140,10 @@ ifneq ($(GCOV),)
|
|||
CFLAGS += $(CFLAGS-GCOV)
|
||||
endif
|
||||
|
||||
ifneq ($(NETWORK_LOCK_DEFAULT),)
|
||||
CFLAGS += -DNETWORK_LOCK_DEFAULT=$(NETWORK_LOCK_DEFAULT)
|
||||
endif
|
||||
|
||||
ifeq ($(ASAN),1)
|
||||
CFLAGS-ASAN := -fsanitize=address
|
||||
export CFLAGS-ASAN
|
||||
|
|
|
|||
|
|
@ -70,7 +70,15 @@ enum NETWORK_LOCK_METHOD {
|
|||
NETWORK_LOCK_SKIP,
|
||||
};
|
||||
|
||||
/**
|
||||
* CRIU currently defaults to the iptables locking backend.
|
||||
*
|
||||
* It is, however, possible to change this by defining
|
||||
* NETWORK_LOCK_DEFAULT to a different value on the command-line.
|
||||
*/
|
||||
#ifndef NETWORK_LOCK_DEFAULT
|
||||
#define NETWORK_LOCK_DEFAULT NETWORK_LOCK_IPTABLES
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Ghost file size we allow to carry by default.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue