diff --git a/miniupnpd/netfilter_nft/nftnlrdr.c b/miniupnpd/netfilter_nft/nftnlrdr.c index 8f251a9..4fe4c36 100644 --- a/miniupnpd/netfilter_nft/nftnlrdr.c +++ b/miniupnpd/netfilter_nft/nftnlrdr.c @@ -189,10 +189,13 @@ get_timestamp(unsigned short eport, int proto) struct timestamp_entry * e; e = timestamp_list; while(e) { - if(e->eport == eport && e->protocol == (short)proto) + if(e->eport == eport && e->protocol == (short)proto) { + syslog(LOG_DEBUG, "timestamp entry found (%hu, %d, %u)", eport, proto, e->timestamp); return e->timestamp; + } e = e->next; } + syslog(LOG_WARNING, "get_timestamp(%hu, %d) no entry found", eport, proto); return 0; } @@ -205,6 +208,7 @@ remove_timestamp_entry(unsigned short eport, int proto) e = *p; while(e) { if(e->eport == eport && e->protocol == (short)proto) { + syslog(LOG_DEBUG, "timestamp entry removed (%hu, %d, %u)", eport, proto, e->timestamp); /* remove the entry */ *p = e->next; free(e); @@ -213,6 +217,7 @@ remove_timestamp_entry(unsigned short eport, int proto) p = &(e->next); e = *p; } + syslog(LOG_WARNING, "remove_timestamp_entry(%hu, %d) no entry found", eport, proto); } static void @@ -227,6 +232,7 @@ add_timestamp_entry(unsigned short eport, int proto, unsigned timestamp) tmp->eport = eport; tmp->protocol = (short)proto; timestamp_list = tmp; + syslog(LOG_DEBUG, "timestamp entry added (%hu, %d, %u)", eport, proto, timestamp); } else { @@ -614,7 +620,6 @@ get_nat_redirect_rule(const char * nat_chain_name, const char * ifname, UNUSED(nat_chain_name); UNUSED(ifname); UNUSED(iaddrlen); - UNUSED(timestamp); UNUSED(packets); UNUSED(bytes); UNUSED(rhost); diff --git a/miniupnpd/upnpsoap.c b/miniupnpd/upnpsoap.c index 520aa72..0ceb4be 100644 --- a/miniupnpd/upnpsoap.c +++ b/miniupnpd/upnpsoap.c @@ -775,10 +775,10 @@ GetSpecificPortMappingEntry(struct upnphttp * h, const char * action, const char } else { - syslog(LOG_INFO, "%s: rhost='%s' %s %s found => %s:%u desc='%s'", + syslog(LOG_INFO, "%s: rhost='%s' %s %s found => %s:%u desc='%s' duration=%u", action, r_host ? r_host : "NULL", ext_port, protocol, int_ip, - (unsigned int)iport, desc); + (unsigned int)iport, desc, leaseduration); bodylen = snprintf(body, sizeof(body), resp, action, ns/*SERVICE_TYPE_WANIPC*/, (unsigned int)iport, int_ip, desc, leaseduration,