From edd501f59c957547c5098ad480c48dfdfa5adf7e Mon Sep 17 00:00:00 2001 From: Daniel Becker Date: Fri, 28 Feb 2014 14:47:53 -0800 Subject: [PATCH] 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. --- miniupnpd/natpmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniupnpd/natpmp.c b/miniupnpd/natpmp.c index c3d26ce..8238a11 100644 --- a/miniupnpd/natpmp.c +++ b/miniupnpd/natpmp.c @@ -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;