From 408a0b55f60d475157d1c9234b217cda9232c6dc Mon Sep 17 00:00:00 2001 From: Daniel Becker Date: Tue, 11 Mar 2014 02:06:38 -0700 Subject: [PATCH] miniupnpd/pcpserver.c: return error code if PCP mapping fails This change causes CreatePCPMap to return a PCP_ERR_NO_RESOURCES response when upnp_redirect_internal does not succeed; previously, no error code was returned in this case. --- miniupnpd/pcpserver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/miniupnpd/pcpserver.c b/miniupnpd/pcpserver.c index 5ba4a25..98a6feb 100644 --- a/miniupnpd/pcpserver.c +++ b/miniupnpd/pcpserver.c @@ -897,6 +897,8 @@ static void CreatePCPMap(pcp_info_t *pcp_msg_info) pcp_msg_info->int_port, desc); + pcp_msg_info->result_code = PCP_ERR_NO_RESOURCES; + } else { syslog(LOG_INFO, "PCP MAP: added mapping %s %hu->%s:%hu '%s'", (pcp_msg_info->protocol==IPPROTO_TCP)?"TCP":"UDP",