miniupnpd/natpmp.c: return correct error code when all external ports in use

Instead of returning code 3 ("Network Failure"), we should the
more appropriate code 4 ("Out of resources") when no external
port is available for a mapping.
This commit is contained in:
Daniel Becker 2014-02-28 14:47:53 -08:00
parent 9c7df04b13
commit edd501f59c
1 changed files with 1 additions and 1 deletions

View File

@ -291,7 +291,7 @@ void ProcessIncomingNATPMPPacket(int s, unsigned char *msg_buff, int len,
if(eport == eport_first) { /* no external port available */
syslog(LOG_ERR, "Failed to find available eport for NAT-PMP %hu %s->%s:%hu",
eport, (proto==IPPROTO_TCP)?"tcp":"udp", senderaddrstr, iport);
resp[3] = 3; /* Failure */
resp[3] = 4; /* Out of resources */
break;
}
continue;