mirror of
https://git.freebsd.org/src.git
synced 2026-01-16 23:02:24 +00:00
netgraph: prevent panic with INVARIANTS-enabled kernel
This change makes NG_ABI_VERSION depend on INVARIANTS in addition to NETGRAPH_DEBUG. PR: 257876 MFC-after: 2 weeks
This commit is contained in:
parent
e59991206b
commit
93b4a54456
1 changed files with 14 additions and 5 deletions
|
|
@ -69,11 +69,20 @@
|
|||
* modules.
|
||||
*/
|
||||
#define _NG_ABI_VERSION 12
|
||||
#ifdef NETGRAPH_DEBUG /*----------------------------------------------*/
|
||||
#define NG_ABI_VERSION (_NG_ABI_VERSION + 0x10000)
|
||||
#else /* NETGRAPH_DEBUG */ /*----------------------------------------------*/
|
||||
#define NG_ABI_VERSION _NG_ABI_VERSION
|
||||
#endif /* NETGRAPH_DEBUG */ /*----------------------------------------------*/
|
||||
|
||||
#ifdef NETGRAPH_DEBUG
|
||||
#define _NG_ABI_PREFIX1 0x10000
|
||||
#else
|
||||
#define _NG_ABI_PREFIX1 0
|
||||
#endif
|
||||
|
||||
#ifdef INVARIANTS
|
||||
#define _NG_ABI_PREFIX2 0x20000
|
||||
#else
|
||||
#define _NG_ABI_PREFIX2 0
|
||||
#endif
|
||||
|
||||
#define NG_ABI_VERSION (_NG_ABI_PREFIX1 + _NG_ABI_PREFIX2 + _NG_ABI_VERSION)
|
||||
|
||||
/*
|
||||
* Forward references for the basic structures so we can
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue