Do check that version of a message from userland matches ours.
MFC after: 3 days
This commit is contained in:
parent
e551a1c3c2
commit
a436589ae2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=141308
@ -255,6 +255,11 @@ ngc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
|
||||
}
|
||||
m_copydata(m, 0, len, (char *)msg);
|
||||
|
||||
if (msg->header.version != NG_VERSION) {
|
||||
error = EINVAL;
|
||||
goto release;
|
||||
}
|
||||
|
||||
#ifdef TRACE_MESSAGES
|
||||
do {
|
||||
item_p item;
|
||||
|
Loading…
Reference in New Issue
Block a user