miniupnpd/natpmp.c: fix walktrough of mapping "list" for NATPMP removal

This commit is contained in:
Thomas Bernard 2014-10-23 18:00:24 +02:00
parent 350ca199c4
commit fb1aba3c9a
1 changed files with 2 additions and 2 deletions

View File

@ -343,12 +343,12 @@ void ProcessIncomingNATPMPPacket(int s, unsigned char *msg_buff, int len,
} else { } else {
syslog(LOG_INFO, "NAT-PMP %s port %hu mapping removed", syslog(LOG_INFO, "NAT-PMP %s port %hu mapping removed",
proto2==IPPROTO_TCP?"TCP":"UDP", eport2); proto2==IPPROTO_TCP?"TCP":"UDP", eport2);
index--;
}
}
} }
} else {
index++; index++;
} }
}
}
} else if(iport==0) { } else if(iport==0) {
resp[3] = 2; /* Not Authorized/Refused */ resp[3] = 2; /* Not Authorized/Refused */
} else { /* iport > 0 && lifetime > 0 */ } else { /* iport > 0 && lifetime > 0 */