Skip to content

Commit 16ea0db

Browse files
committed
miniupnpd: Fix PCP Map renewal
1 parent 50f8f6c commit 16ea0db

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

miniupnpd/Changelog.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
$Id: Changelog.txt,v 1.350 2014/02/06 09:52:03 nanard Exp $
1+
$Id: Changelog.txt,v 1.351 2014/02/11 09:35:52 nanard Exp $
2+
3+
2014/02/11:
4+
Fix PCP Map renewal
25

36
2014/02/06:
47
possibility to disable ipv6 at runtime

miniupnpd/pcpserver.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: pcpserver.c,v 1.7 2014/02/03 09:38:26 nanard Exp $ */
1+
/* $Id: pcpserver.c,v 1.9 2014/02/11 09:35:53 nanard Exp $ */
22
/* MiniUPnP project
33
* Website : http://miniupnp.free.fr/
44
* Author : Peter Tatrai
@@ -803,7 +803,7 @@ static void CreatePCPMap(pcp_info_t *pcp_msg_info)
803803
char desc[64];
804804
char iaddr_old[INET_ADDRSTRLEN];
805805
uint16_t iport_old;
806-
unsigned int timestamp = time(NULL) + pcp_msg_info->lifetime;
806+
unsigned int timestamp;
807807
int r=0;
808808

809809
if (pcp_msg_info->ext_port == 0) {
@@ -840,6 +840,8 @@ static void CreatePCPMap(pcp_info_t *pcp_msg_info)
840840
}
841841
} while (r==0);
842842

843+
timestamp = time(NULL) + pcp_msg_info->lifetime;
844+
843845
if ((pcp_msg_info->ext_port == 0) ||
844846
(IN6_IS_ADDR_V4MAPPED(pcp_msg_info->int_ip) &&
845847
(!check_upnp_rule_against_permissions(upnppermlist,

0 commit comments

Comments
 (0)