Usage of sosend() and its context

Julian Kornberger jk at kornberger.name
Mon Jun 13 21:08:38 UTC 2016


Hi,

I am building a kernel module for fastd [1] and have the problem, that 
on one of three machines the sosend() call seems to block. I use 
sosend() [2] in a tunneling function that is set by 
udp_set_kernel_tunneling().

Since I don't know which thread to pass to sosend() I just use 
curthread. Is it possible that I should not use sosend() in this context 
and instead build the IP packet manually and pass it to ip_output()? Any 
other hints?

[1] https://fastd.readthedocs.io/
[2] 
https://github.com/digineo/fastd/blob/97fd40b9992778a3bf11756f41aa7c2615bba2f3/kmod/fastd.c#L664

Regards,
Julian


More information about the freebsd-hackers mailing list