* helper match bug?
@ 2012-10-11 19:09 Brian Morris
2012-10-12 0:15 ` /dev/rob0
0 siblings, 1 reply; 2+ messages in thread
From: Brian Morris @ 2012-10-11 19:09 UTC (permalink / raw)
To: netfilter
It seems the helper match shouldn't succeed if the strings being
compared aren't the same length.
For example, both of these nat rules match the helper connections if I
start an FTP session on master port 212 with FTP conntrack configured to
support both ports:
-A PREROUTING -p tcp -m state --state RELATED -m helper --helper
"ftp-212"
-A PREROUTING -p tcp -m state --state RELATED -m helper --helper
"ftp-2122"
because the strncmp is just using the length of the helper. Is this by
design?
Thanks
Brian
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: helper match bug?
2012-10-11 19:09 helper match bug? Brian Morris
@ 2012-10-12 0:15 ` /dev/rob0
0 siblings, 0 replies; 2+ messages in thread
From: /dev/rob0 @ 2012-10-12 0:15 UTC (permalink / raw)
To: netfilter
On Thu, Oct 11, 2012 at 12:09:55PM -0700, Brian Morris wrote:
> It seems the helper match shouldn't succeed if the strings being
> compared aren't the same length.
>
> For example, both of these nat rules match the helper connections
> if I start an FTP session on master port 212 with FTP conntrack
> configured to support both ports:
>
> -A PREROUTING -p tcp -m state --state RELATED -m helper --helper
> "ftp-212"
> -A PREROUTING -p tcp -m state --state RELATED -m helper --helper
> "ftp-2122"
>
> because the strncmp is just using the length of the helper. Is
> this by design?
The nat table only sees -m state --state (or preferred, -m conntrack
--ctstate) NEW packets. You have restricted your rule to match
packets which will never reach that table/chain.
--
http://rob0.nodns4.us/ -- system administration and consulting
Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-12 0:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-11 19:09 helper match bug? Brian Morris
2012-10-12 0:15 ` /dev/rob0
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox