mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-10 12:29:56 +00:00
Don't process MDP packets if the local address is invalid
This commit is contained in:
parent
9ed507f740
commit
8db634d2d9
@ -1347,6 +1347,7 @@ static void mdp_process_packet(struct socket_address *client, struct mdp_header
|
||||
if (!internal_header.source || internal_header.source->reachable != REACHABLE_SELF){
|
||||
mdp_reply_error(client, header);
|
||||
WHY("Subscriber is not local");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1354,6 +1355,7 @@ static void mdp_process_packet(struct socket_address *client, struct mdp_header
|
||||
|
||||
// assign the next available port number
|
||||
if (header->local.port==0 && header->flags & MDP_FLAG_BIND){
|
||||
// TODO check if the port is already bound
|
||||
if (next_port_binding > 32*1024)
|
||||
next_port_binding=256;
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user