Allow creating connections on unspecified local port
If the given local port is 0, we get no replies.
This commit is contained in:
parent
34dd6423f2
commit
8211db64ae
|
@ -119,7 +119,7 @@ simple_udp_register(struct simple_udp_connection *c,
|
||||||
|
|
||||||
PROCESS_CONTEXT_BEGIN(&simple_udp_process);
|
PROCESS_CONTEXT_BEGIN(&simple_udp_process);
|
||||||
c->udp_conn = udp_new(remote_addr, UIP_HTONS(remote_port), c);
|
c->udp_conn = udp_new(remote_addr, UIP_HTONS(remote_port), c);
|
||||||
if(c->udp_conn != NULL) {
|
if(c->udp_conn != NULL && local_port) {
|
||||||
udp_bind(c->udp_conn, UIP_HTONS(local_port));
|
udp_bind(c->udp_conn, UIP_HTONS(local_port));
|
||||||
}
|
}
|
||||||
PROCESS_CONTEXT_END();
|
PROCESS_CONTEXT_END();
|
||||||
|
|
Loading…
Reference in a new issue