Skip to contentSkip to conversation

ip_conntrack_ftp messages

DISCUSSION Rusty Russell 5 participants 9 messages Nov 24, 2008 1 message not in the archive netfilter

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 31563483.01227485595724.JavaMail.shane@shane-laptop

#1 lore raw
Quoted 3 lines · On Monday 24 November 2008 10:43:19 Shane Goulden wrote:

2.6.18-92.1.10.el5xen

FTP is working. Is there a way to easily silence the messages?

Not that I am aware of. Perhaps that printk (still there in latest kernels) should be downgraded to a DEBUG?

		if (net_ratelimit())
			printk("conntrack_ftp: partial %s %u+%u\n",
			       search[dir][i].pattern,
			       ntohl(th->seq), datalen);

Cheers,
Rusty.

#2 lore raw
Quoted 11 lines · Rusty Russell
Quoted 3 lines · On Monday 24 November 2008 10:43:19 Shane Goulden wrote:

2.6.18-92.1.10.el5xen

FTP is working. Is there a way to easily silence the messages?

Not that I am aware of. Perhaps that printk (still there in latest kernels) should be downgraded to a DEBUG?

		if (net_ratelimit())
			printk("conntrack_ftp: partial %s %u+%u\n",
			       search[dir][i].pattern,
			       ntohl(th->seq), datalen);

Its strange that FTP is apparently working since we drop those packets. I'm not sure about downgrading that message, its there to inform the user of an exceptional action (dropping of packets within conntrack).

Shane, how do you trigger those messages?

#3 lore raw
Quoted 6 lines · Patrick McHardy
Quoted 5 lines · Rusty Russell
Quoted 3 lines · On Monday 24 November 2008 10:43:19 Shane Goulden wrote:

2.6.18-92.1.10.el5xen

FTP is working. Is there a way to easily silence the messages?

Quoted 8 lines
Quoted 3 lines

Not that I am aware of. Perhaps that printk (still there in latest kernels) should be downgraded to a DEBUG?

Its strange that FTP is apparently working since we drop those packets. I'm not sure about downgrading that message, its there to inform the user of an exceptional action (dropping of packets within conntrack).

Shane, how do you trigger those messages?

I've seen these messages when something other than FTP is utilizing port 21. Perhaps we should have a bit in the conntrack helper which stops looking on future packets if it doesn't see FTP traffic in the beginning of the session?

Phil

#4 lore raw
Quoted 12 lines · Phil Oester
Quoted 11 lines · Patrick McHardy
Quoted 6 lines · Rusty Russell
Quoted 3 lines · On Monday 24 November 2008 10:43:19 Shane Goulden wrote:

2.6.18-92.1.10.el5xen

FTP is working. Is there a way to easily silence the messages?

Not that I am aware of. Perhaps that printk (still there in latest kernels) should be downgraded to a DEBUG?

Its strange that FTP is apparently working since we drop those packets. I'm not sure about downgrading that message, its there to inform the user of an exceptional action (dropping of packets within conntrack).

Quoted 6 lines
Quoted 1 line

Shane, how do you trigger those messages?

I've seen these messages when something other than FTP is utilizing port 21. Perhaps we should have a bit in the conntrack helper which stops looking on future packets if it doesn't see FTP traffic in the beginning of the session?

That would make sense, but I can't see a good way to make this decision except maybe when we seen non-ascii characters. But even that will fail with different encodings. Do you have a good idea?

#5 lore raw
Quoted 10 lines · Patrick McHardy
Quoted 5 lines

I've seen these messages when something other than FTP is utilizing port 21. Perhaps we should have a bit in the conntrack helper which stops looking on future packets if it doesn't see FTP traffic in the beginning of the session?

That would make sense, but I can't see a good way to make this decision except maybe when we seen non-ascii characters. But even that will fail with different encodings. Do you have a good idea?

Well, each packet (or rather, every new line) should be a "123 " code, followed by whatever text plus a newline.

#6 lore raw
Quoted 5 lines · Jan Engelhardt
Quoted 4 lines · Patrick McHardy
Quoted 4 lines

I've seen these messages when something other than FTP is utilizing port 21. Perhaps we should have a bit in the conntrack helper which stops looking on future packets if it doesn't see FTP traffic in the beginning of the session?

Quoted 7 lines
Quoted 4 lines

That would make sense, but I can't see a good way to make this decision except maybe when we seen non-ascii characters. But even that will fail with different encodings. Do you have a good idea?

Well, each packet (or rather, every new line) should be a "123 " code, followed by whatever text plus a newline.

Right, that should work. If someone wants to cook up a patch, I have no objections :)

#7 lore raw
In reply to Jan Engelhardt

Hello,

Quoted 3 lines · Jan Engelhardt

Well, each packet (or rather, every new line) should be a "123 " code, followed by whatever text plus a newline.

Don't you mean "each reply" ? BTW, multi-line replies start with "123-", only the last line starts with "123 ". --
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw
In reply to Patrick McHardy
Quoted 9 lines · On Monday 24 November 2008 22:58:09 Patrick McHardy wrote:
Quoted 4 lines · Rusty Russell
		if (net_ratelimit())
			printk("conntrack_ftp: partial %s %u+%u\n",
			       search[dir][i].pattern,
			       ntohl(th->seq), datalen);

Its strange that FTP is apparently working since we drop those packets. I'm not sure about downgrading that message, its there to inform the user of an exceptional action (dropping of packets within conntrack).

Actually, we drop the packets *so* it will work. The idea is that they'll coalesce and send the whole packet next time.

If not, well, they don't get any more packes through, but without connection tracking the other connections wouldn't work anyway (if the conntrack is being used for NAT or filtering).

IIRC wu-ftpd used to trigger this (multiple write syscalls for the ip address and nagle sometimes hit in the middle; go figure).

Cheers,
Rusty.

#9 lore raw
Quoted 11 lines · Rusty Russell
Quoted 8 lines · On Monday 24 November 2008 22:58:09 Patrick McHardy wrote:
Quoted 4 lines · Rusty Russell
		if (net_ratelimit())
			printk("conntrack_ftp: partial %s %u+%u\n",
			       search[dir][i].pattern,
			       ntohl(th->seq), datalen);

Its strange that FTP is apparently working since we drop those packets. I'm not sure about downgrading that message, its there to inform the user of an exceptional action (dropping of packets within conntrack).

Actually, we drop the packets *so* it will work. The idea is that they'll coalesce and send the whole packet next time.

I see. The only case in which I triggered it so far was when sending incomplete PORT commands using telnet, so I missed this important fact :)

Quoted 3 lines

If not, well, they don't get any more packes through, but without connection tracking the other connections wouldn't work anyway (if the conntrack is being used for NAT or filtering).

IIRC wu-ftpd used to trigger this (multiple write syscalls for the ip address and nagle sometimes hit in the middle; go figure).

Thanks for the explanation. I'll queue up a patch for 2.6.29 to change it to pr_debug().