Subject: irpas: tctrace: ICMP packet to small to carry original IP header

From: Cristian Ionescu-Idbohrn <[email-masked]>
Date: Fri, 3 Jan 2003 14:22:37 +0100 (CET)

Package: irpas
Version: 0.10-2
Severity: normal
Tags: sid

tctrace is confused:

,----
| # tctrace -v -i eth3 -d212.162.160.10
| Tracing with TCP SYNs to 212.162.160.10
| Timeout 3, interface eth3
| ICMP packet to small to carry original IP header
| Should be 48, is 40
| <above 2 lines repeated several times>
|  1(1)   Timeout
`----

strace seems to indicate tctrace is listening to the wrong thing :(
Mixing up interfaces (see below: packets to 193.13.178.2 are routed
over eth0 in my case, not eth3)? I didn't ask it to do anything with
193.13.178.2, only 212.162.160.10. Another process runs:

  fping 193.13.178.2

and has nothing in common with tctrace.

,----
| # strace -F -ff tctrace -v -i eth3 -d212.162.160.10
| execve("/usr/sbin/tctrace",
|   ["tctrace", "-v", "-i", "eth3", "-d212.162.160.10"], [/* 54 vars */]) = 0
| uname({sys="Linux", node="my-box", ...}) = 0
| brk(0)                                  = 0x804c3bc
| access("/etc/ld.so.nohwcap", F_OK)      = -1
|   ENOENT (No such file or directory)
| open("/etc/ld.so.preload", O_RDONLY)    = -1
|   ENOENT (No such file or directory)
| open("/etc/ld.so.cache", O_RDONLY)      = 4
| fstat64(4, {st_mode=S_IFREG|0644, st_size=87526, ...}) = 0
| old_mmap(NULL, 87526, PROT_READ, MAP_PRIVATE, 4, 0) = 0x40012000
| close(4)                                = 0
| open("/lib/libc.so.6", O_RDONLY)        = 4
| read(4,
|      "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0]Z\1\000"...,
|       1024) = 1024
| fstat64(4, {st_mode=S_IFREG|0755, st_size=1102952, ...}) = 0
| old_mmap(NULL, 1113220, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x40028000
| mprotect(0x40130000, 31876, PROT_NONE)  = 0
| old_mmap(0x40130000, 24576, PROT_READ|PROT_WRITE,
|          MAP_PRIVATE|MAP_FIXED, 4, 0x107000) = 0x40130000
| old_mmap(0x40136000, 7300, PROT_READ|PROT_WRITE,
|          MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40136000
| close(4)                                = 0
| old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
|          MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40138000
| munmap(0x40012000, 87526)               = 0
| brk(0)                                  = 0x804c3bc
| brk(0x804d3bc)                          = 0x804d3bc
| brk(0)                                  = 0x804d3bc
| brk(0x804e000)                          = 0x804e000
| fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 8), ...}) = 0
| old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
|          MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40012000
| write(1, "Tracing with TCP SYNs to 212.162"...,
|       40Tracing with TCP SYNs to 212.162.160.10) = 40
| write(1, "Timeout 3, interface eth3\n", 26Timeout 3, interface eth3) = 26
| socket(PF_INET, SOCK_RAW, IPPROTO_RAW)  = 4
| ioctl(4, 0x8927, 0xbffff634)            = 0
| ioctl(4, 0x8915, 0xbffff634)            = 0
| ioctl(4, 0x8921, 0xbffff634)            = 0
| ioctl(4, 0x8919, 0xbffff634)            = 0
| socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = 5
| fcntl64(5, F_GETFL)                     = 0x2 (flags O_RDWR)
| fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
| socket(PF_INET, SOCK_RAW, IPPROTO_TCP)  = 6
| fcntl64(6, F_GETFL)                     = 0x2 (flags O_RDWR)
| fcntl64(6, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
| time(NULL)                              = 1041598204
| sendto(4, "E\0\0(\0\1\0\0\1\6\0\0\n\n\n\27\324\242\240\n\4(\0P\0\0"...,
|        40, 0, {sin_family=AF_INET, sin_port=htons(0),
|        sin_addr=inet_addr("212.162.160.10")}}, 16) = 40
| time(NULL)                              = 1041598204
| time(NULL)                              = 1041598204
| recvfrom(5, 0x804c420, 74, 0, 0xbffff6f8, 0xbffff6b8) = -1
|   EAGAIN (Resource temporarily unavailable)
| recvfrom(6, 0x804c420, 74, 0, 0xbffff6f8, 0xbffff6b8) = -1
|   EAGAIN (Resource temporarily unavailable)
| nanosleep({0, 10}, NULL)                = 0
| time(NULL)                              = 1041598204
| recvfrom(5, "E\0\0(\323\330\0\0002\1\37\6\301\r\262\2\300\250b>\0\0"...,
|          74, 0, {sin_family=AF_INET, sin_port=htons(8192),
|          sin_addr=inet_addr("193.13.178.2")}}, [16]) = 40
| write(1, "ICMP packet to small to carry or"...,
|       49ICMP packet to small to carry original IP header) = 49
| write(1, "Should be 48, is 40\n", 20Should be 48, is 40)   = 20
| recvfrom(6, 0x804c420, 74, 0, 0xbffff6f8, 0xbffff6b8) = -1
|   EAGAIN (Resource temporarily unavailable)
| nanosleep({0, 10}, NULL)                = 0
| time(NULL)                              = 1041598204
`----

Cheers,
Cristian

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux my-box 2.4.19 #1 Thu Aug 8 22:22:57 CEST 2002 i686
Locale: LANG=C, LC_CTYPE=

Versions of packages irpas depends on:
ii  libc6                         2.3.1-8    GNU C Library: Shared libraries an
ii  libpcap0.7                    0.7.1-1    System interface for user-level pa

-- no debconf information