mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Add KASSERT to check that proper targed was used.
MFC after: 2 weeks
This commit is contained in:
parent
e3004d2429
commit
d158b221e5
1 changed files with 2 additions and 0 deletions
|
|
@ -185,6 +185,8 @@ key_sendup_mbuf(struct socket *so, struct mbuf *m, int target)
|
|||
KASSERT(m != NULL, ("NULL mbuf pointer was passed."));
|
||||
KASSERT(so != NULL || target != KEY_SENDUP_ONE,
|
||||
("NULL socket pointer was passed."));
|
||||
KASSERT(target == KEY_SENDUP_ONE || target == KEY_SENDUP_ALL ||
|
||||
target == KEY_SENDUP_REGISTERED, ("Wrong target %d", target));
|
||||
|
||||
PFKEYSTAT_INC(in_total);
|
||||
PFKEYSTAT_ADD(in_bytes, m->m_pkthdr.len);
|
||||
|
|
|
|||
Loading…
Reference in a new issue