Found a number of problems with the router when compiling on linux * Expected malloc()'ed memory to be zeroed resulting in segfault * IPC_NOWAIT in iplayer loop means incoming traffic will be delayed until outgoing traffic is received. * When configured with two BIP interfaces, broadcast loops ensue because the broacast traffic is not correctly filtered. I think the safest thing to do here is to use the SO_BINDTODEVICE setsockopt.
This commit is contained in:
committed by
GitHub
parent
038ba9ec2b
commit
adf66f412d
@@ -58,12 +58,12 @@ bool send_to_msgbox(MSGBOX_ID dest, BACMSG *msg)
|
||||
return true;
|
||||
}
|
||||
|
||||
BACMSG *recv_from_msgbox(MSGBOX_ID src, BACMSG *msg)
|
||||
BACMSG *recv_from_msgbox(MSGBOX_ID src, BACMSG *msg, int flags)
|
||||
{
|
||||
int recv_bytes;
|
||||
|
||||
recv_bytes =
|
||||
msgrcv(src, msg, sizeof(BACMSG) - sizeof(MSGTYPE), 0, IPC_NOWAIT);
|
||||
msgrcv(src, msg, sizeof(BACMSG) - sizeof(MSGTYPE), 0, flags);
|
||||
if (recv_bytes > 0) {
|
||||
return msg;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user