NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/50198: SIOCGNATL broken in IPFilter 5
The following reply was made to PR kern/50198; it has been noted by GNATS.
From: =?UTF-8?Q?Egerv=c3=a1ry_Gergely?= <gergely%egervary.hu@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: kern/50198: SIOCGNATL broken in IPFilter 5
Date: Fri, 30 Sep 2016 18:04:23 +0200
> ipnat SIOCGNATL from IPFilter v5 doesn't look up redirected
> destination IP addresses correctly, which breaks transparent proxies
> such as squid.
>
> IPFilter 4 in NetBSD 5 returns:
> real: 192.168.204.87:80
> IPFilter 5 in NetBSD 7 returns:
> real: 127.0.0.1:1234
>
> I think ipf_nat_lookupredir() is simply returning the wrong variables.
I can confirm this, the patch below fixes it:
--- ip_nat.c.orig 2016-04-30 05:33:02.000000000 +0200
+++ ip_nat.c 2016-09-30 17:16:03.000000000 +0200
@@ -4620,8 +4620,10 @@
}
}
- np->nl_realip = nat->nat_ndstip;
- np->nl_realport = nat->nat_ndport;
+ np->nl_realip = nat->nat_odstip;
+ np->nl_realport = nat->nat_odport;
}
}
Please commit a fix.
(hi Darren, are You here?)
Thank You,
Gergely EGERVARY
Home |
Main Index |
Thread Index |
Old Index