diff -r -U4 oidentd-2.0.7/src/kernel/linux.c oidentd-2.0.7+byte/src/kernel/linux.c --- oidentd-2.0.7/src/kernel/linux.c 2003-02-12 04:06:17.000000000 +0000 +++ oidentd-2.0.7+byte/src/kernel/linux.c 2005-07-30 23:13:27.000000000 +0100 @@ -351,10 +353,15 @@ if (mport != lport) continue; +/* if (masq_fport != fport) continue; +*/ + + if (nport != fport) + continue; if (remotem != ntohl(SIN4(faddr)->sin_addr.s_addr)) { if (!opt_enabled(PROXY)) continue; @@ -367,19 +374,8 @@ } sin_setv4(htonl(localm), &ss); - if (opt_enabled(FORWARD)) { - char ipbuf[MAX_IPLEN]; - - if (fwd_request(sock, lport, masq_lport, fport, &ss) == 0) - goto out_success; - - get_ip(&ss, ipbuf, sizeof(ipbuf)); - - debug("Forward to %s (%d %d) failed", ipbuf, masq_lport, fport); - } - ret = find_masq_entry(&ss, user, sizeof(user), os, sizeof(os)); if (ret == 0) { char ipbuf[MAX_IPLEN]; @@ -393,8 +389,19 @@ ipbuf, lport, fport, user); goto out_success; } + + if (opt_enabled(FORWARD)) { + char ipbuf[MAX_IPLEN]; + + if (fwd_request(sock, lport, masq_lport, fport, &ss) == 0) + goto out_success; + + get_ip(&ss, ipbuf, sizeof(ipbuf)); + + debug("Forward to %s (%d %d) failed", ipbuf, masq_lport, fport); + } } fclose(fp); return (-1);