change divert socket to use a sockaddr_div struct
Nick Hibma
nick at van-laarhoven.org
Thu Feb 27 09:15:16 UTC 2020
Folks,
We would like to use FIBs for routing, but currently cannot because the FIB is lost when the packet goes through a divert socket for processing. I've attached a patch that should fix this situation, and while there fix the limit of 7 characters for the interface name which some people got bitten by. This fix was suggested some time ago by Warner Losh.
I've changed the sockaddr_in to a sockaddr_di struct to pass the FIB number and the complete interface, and other info in and out. But this seems to lead to memory corruption. Perhaps someone who knows the API can tell me where I should look for memory corruption issues, because this patch causes random crashes. I assume it's because of overwriting random memory.
Thanks in advance.
Nick Hibma
nick at van-laarhoven.org
-- Open Source: We stand on the shoulders of giants.
More information about the freebsd-arch
mailing list