Cutter does not work as described; it always reports "No matching
connections found". Here is a repeatable example:
netstat -an | grep 'ESTABLISHED'
tcp 0 0 192.168.130.5:38101 10.1.30.129:22 ESTABLISHED
tcp 0 0 192.168.130.5:38819 10.1.30.129:993 ESTABLISHED
....
cutter 192.168.130.5 38101 10.1.30.129 22
No matching connections found
cutter 192.168.130.5 38101 10.1.30.129
No matching connections found
cutter 192.168.130.5 38101
No matching connections found
cutter 10.1.30.129 22 192.168.130.5 38101
No matching connections found
cutter 10.1.30.129 22 192.168.130.5
No matching connections found
cutter 10.1.30.129 22
No matching connections found
Regards,
Chris
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (900, 'stable'), (300, 'unstable'), (50, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.21-2-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages cutter depends on:
ii libc6 2.6.1-1+b1 GNU C Library: Shared libraries
cutter recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
On Fri, Oct 12, 2007 at 11:13:44AM +0100, Chris Davies wrote:
>Cutter does not work as described; it always reports "No matching
>connections found". Here is a repeatable example:
>
>netstat -an | grep 'ESTABLISHED'
>tcp 0 0 192.168.130.5:38101 10.1.30.129:22 ESTABLISHED
>tcp 0 0 192.168.130.5:38819 10.1.30.129:993 ESTABLISHED
>....
>
>cutter 192.168.130.5 38101 10.1.30.129 22
>No matching connections found
>cutter 192.168.130.5 38101 10.1.30.129
>No matching connections found
>cutter 192.168.130.5 38101
>No matching connections found
>
>cutter 10.1.30.129 22 192.168.130.5 38101
>No matching connections found
>cutter 10.1.30.129 22 192.168.130.5
>No matching connections found
>cutter 10.1.30.129 22
>No matching connections found
I am not able to reproduce it. Does cutter still behave like this if
you try it now?
Cheers,
--
.''`. Aurélien GÉRÔME
: :' :
`. `'` Free Software Developer
`- Unix Sys & Net Admin
I've added some debug to the program, and it seems to me that it simply cannot
work. Either that or I'm grossly misunderstanding what it does.
The attached patch applies my debug code to the debian cutter version 1.03-2.
Apologies for the code quality; I haven't written any C for a good number of
years, now, and it was thrown together in a hurry.
To reproduce the situation where it doesn't work for me, you need three
systems: A (10.1.20.42 /16) and C (192.168.130.252 /21) are connected via B
(10.1.1.106 /16 and 192.168.133.13 /21). There's no NAT involved. On A, ssh to
C. Log in to B and you'll see an entry in /proc/net/ip_conntrack matching the
connection.
I picked it out with this ugly line:
sudo grep 'tcp.*ESTABLISHED' /proc/net/ip_conntrack | grep '10.1.20.42' | grep
'192.168.*252' | grep 'port=22 '
Now run the patched version of cutter and you'll see something like this:
Args: /tmp/cutter 192.168.130.252 22 10.1.20.42
...
Got tcp/ESTABLISHED
> src=10.1.20.42
> dst=192.168.130.252
> sport=36707
> dport=22
> src=192.168.130.252
> dst=10.1.20.42
> sport=22
> dport=36707
Matched IP and port
localip(src1n=10.1.20.42)=0, localip(dst1n=192.168.130.252)=0,
localip(src2n=192.168.130.252)=0, localip(dst2n=10.1.20.42)=0
Got tcp/ESTABLISHED
...
Looking at the code around 540, there are a number of condition criteria that
check for local/remote IP address (I guess that "local" means a local
interface for the box on which cutter is running).
If you have a connection from A to C, via B, then neither of the address pairs
are going to be local, so neither of the two if() statements can succeed.
I haven't had time to dig further (maybe tomorrow), but I would imagine a
patch will be pretty straightforward.
Regards,
Chris
Have you had time to look at this, yet? I would be interested in you
describing a setup that I can try to reproduce here, as I cannot get cutter to
work for me at all.
With regard to my throwaway comment of Feb 14 that, "I would imagine a patch
will be pretty straightforward", are you planning to do this or should I have
a stab at it?
Regards,
Chris
Hi,
On Sat, Mar 08, 2008 at 09:37:20AM +0000, Chris Davies wrote:
> Have you had time to look at this, yet? I would be interested in you
> describing a setup that I can try to reproduce here, as I cannot get cutter
> to work for me at all.
No, I had not. I need to organise several boxes in the same network
topology as yours to reproduce your setup, but I currently do not
have physical access to such boxes. I thought about a setup with
several qemu instances though, but this is really tedious.
Perhaps I can hook up some free Ultra5 boxes at work to reproduce
your setup, I will try it this month. I am currently working on the
PS3 integration in Debian, so this probably will not happen this
upcoming week. :)
> With regard to my throwaway comment of Feb 14 that, "I would imagine a
> patch will be pretty straightforward", are you planning to do this or
> should I have a stab at it?
If you can fix what happens in your setup which I believe is a right
use case, I will gratefully accept your patch. I will test it to see
if it does not break my simple daily-use setup, and then do an upload
to fix this bug.