When used as divert socket we need to decouple stack when node is entered
from socket side. Use ng_queue_fn() instead of ng_send_fn().
This commit is contained in:
parent
aacdb11479
commit
0f4a3524dd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146181
@ -1001,6 +1001,8 @@ ng_ksocket_disconnect(hook_p hook)
|
||||
* the request has at least been done, but the 'so' may not be so lucky.
|
||||
* handle this by checking the validity of the node in the target function
|
||||
* before dereferencing the socket pointer.
|
||||
*
|
||||
* To decouple stack, we use queue version of ng_send_fn().
|
||||
*/
|
||||
|
||||
static void
|
||||
@ -1008,7 +1010,7 @@ ng_ksocket_incoming(struct socket *so, void *arg, int waitflag)
|
||||
{
|
||||
const node_p node = arg;
|
||||
|
||||
ng_send_fn(node, NULL, &ng_ksocket_incoming2, so, waitflag);
|
||||
ng_queue_fn(node, NULL, &ng_ksocket_incoming2, so, waitflag);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user