Remove some bugs in DeletePCPPeer and DeletePCPMap
This commit is contained in:
parent
e405f78b89
commit
a8ab2149f4
|
@ -315,6 +315,7 @@ delete_pinhole(unsigned short uid)
|
|||
}
|
||||
ip6tc_free(h);
|
||||
syslog(LOG_WARNING, "delete_pinhole() rule with PID=%hu not found", uid);
|
||||
LIST_REMOVE(p, entries);
|
||||
return -2; /* not found */
|
||||
error:
|
||||
ip6tc_free(h);
|
||||
|
|
|
@ -854,7 +854,7 @@ static void DeletePCPPeer(pcp_info_t *pcp_msg_info)
|
|||
rhost2, sizeof(rhost2), &rport2,
|
||||
iaddr2, sizeof(iaddr2), &iport2,
|
||||
&proto2, desc, sizeof(desc),
|
||||
×tamp, NULL) > 0)
|
||||
×tamp, NULL) >= 0)
|
||||
#endif /* 0 */
|
||||
;
|
||||
index++)
|
||||
|
@ -1063,7 +1063,7 @@ static void DeletePCPMap(pcp_info_t *pcp_msg_info)
|
|||
/* remove all the mappings for this client */
|
||||
int index;
|
||||
unsigned short eport2, iport2;
|
||||
char iaddr2[16];
|
||||
char iaddr2[INET6_ADDRSTRLEN];
|
||||
int proto2;
|
||||
char desc[64];
|
||||
unsigned int timestamp;
|
||||
|
@ -1087,7 +1087,7 @@ static void DeletePCPMap(pcp_info_t *pcp_msg_info)
|
|||
NULL, 0, NULL,
|
||||
iaddr2, sizeof(iaddr2), &iport2,
|
||||
&proto2, desc, sizeof(desc),
|
||||
×tamp, NULL) > 0)
|
||||
×tamp, NULL) >= 0)
|
||||
#endif /* ENABLE_UPNPPINHOLE */
|
||||
;
|
||||
index++)
|
||||
|
|
Loading…
Reference in New Issue