File: KNOWN_BUGS

package info (click to toggle)
ntop 3:3.3-11
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 12,772 kB
  • ctags: 7,534
  • sloc: ansic: 71,427; sh: 16,772; awk: 1,504; perl: 792; makefile: 782; php: 123; python: 23; sql: 13; sed: 11
file content (331 lines) | stat: -rw-r--r-- 10,573 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
   _   _ _
  | \ | | |_ ___  _ __
  |  \| | __/ _ \| '_ \
  | |\  | || (_) | |_) |
  |_| \_|\__\___/| .__/
                 |_|

             Network Top

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
v2.1 (Jun 2002)

B1. https:// & tcp wrappers

     If you compile ntop with tcp wrappers and attempt to access an 
     https:// url, it will fail with

        "Jun 11 14:22:52 www ntop[22622]: warning: can't get client address: Bad file descriptor"

     in the log.  

     hosts.allow:

       ntop: 192.168.0.

     hosts.deny:

       ntop: ALL


     No real clue why - the code that ntop uses:

         {
           struct request_info req;
           request_init(&req, RQ_DAEMON, DAEMONNAME, RQ_FILE, myGlobals.newSock, NULL);
           fromhost(&req);
           if(!hosts_access(&req)) {
             closelog(); /* just in case */
             openlog(DAEMONNAME, LOG_PID, deny_severity);
             syslog(deny_severity, "refused connect from %s", eval_client(&req));
           }
           else
             handleHTTPrequest(from.sin_addr);
         }

     is the same as the code used, for example, by sshd. 

     It's the fromhost() call - without a value set there, there is no file descriptor
     set, and the hosts_access() call is then "properly" rejecting the request.


========================================

B2. https:// & Opera

     With fixes through 25Jun2002, this works, albeit VERY SLOWLY on the handshake.
     Sometimes as much as two minutes.  After that, clicking around through the 
     ntop web server works fine, but it is also subject to a noticeable delay bringing
     up the png images.

     However, some versions of Opera (6.03 under Win98), give an SSL error and no results:

        Jun 29 08:17:31 localhost ntop[17731]: SSL(read)ERROR [Thread 17731]: error:140EC0E5:SSL routines:SSL2_READ_INTERNAL:ssl handshake failure at s2_pkt.c(142)  

     Sometimes with tcp wrappers enabled you get errors:

        Jun 25 12:17:37 tigger ntop[26664]: SSL(ssl_init_connection)ERROR [Thread 26664]: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request at s23_srvr.c(390)  
        Jun 25 12:17:37 tigger ntop[26664]: warning: can't get client address: Bad file descriptor

     It's unknown - but suspected - that this last case is the same as #1, above.
 

========================================

B3. sflowPlugin.c will not compile in single threaded mode

   (it uses queuePacket, which is #ifdef ed out in pbuf.c)

================================================================================
ISSUES - not bugs per se, but worth a comment...
================================================================================

I1. https:// & Netscape 6.2.2 et al

     Hangs the ntop web server thread.  It goes into the ssl_accept() routine and
     never comes back.  ntop continues processing packets, but there is no way to
     retrieve data or softly shutdown ntop.  According to openSSL, it's a problem
     with Netscape not handling a legal combination of flags on the handshake.
     openSSL 0.9.6c (or d?) is supposed to have a work-around for this. Both sides
     (client and server) are waiting for the other to finish the handshake.

     A partial fix is present in the final code, but disabled by default.  This uses
     a watchdog thread to detect the hang and cancel out the connection.  It means
     that the offending user gets nothing returned, but at least the ntop web server
     isn't hung.

     The fix is enabled either by the ./configure parameter --enable-sslwatchdog
     or the run-time parameter --ssl-watchdog.

     Testing seems to show this is not necessary for:

        Linux / konqueror 2.2.2 (under kde 2.2.2-2)
        Linux / mozilla 0.9.9-12.7.2
        Linux / mozilla 1.0.1-4
        Linux / Netscape (Navigator) 4.78-2

        Win2K / Internet Explorer 5.5
        Win2K / Netscape (Navigator) 4.79
        Win2K / Netscape (Navigator) 4.61 (oh the things I do for Luca...)

        Win98 / Internet Explorer 5.5

     It is necessary, but the fix "works" for:

        Linux / Galeon 1.2.0-5
        Linux / Galeon 1.2.5-3
        Linux / Opera 6.0-20020225.3

        Win2K / Netscape 6.2.2
        Win2K / Opera 6.03

     Remember, saying it "works" means that the hangup doesn't kill ntop's web server
     for other users, not that the user of the offending browser will see
     anything meaningful.  Galeon gets farther, but still hangs itself up.

   Recommended:
     If you aren't seeing the problem:
         don't worry - be happy.
     If you are, try running for a while with --ssl-watchdog
         If that seems to fix it, then compile with --enable-sslwatchdog


========================================

I2. SIGPIPE - primarilly under gdb in Win2K environment.

   The problem is that Internet Explorer (and other browsers) seem to close
   the connection when they receive an unknown certificate in response to
   an https:// request.  This causes a SIGPIPE and kills the web handling
   thread - sometimes (for sure, the ONLY case I know of is if ntop is
   run under Linux gdb connected to from a Win2K browser).
   
   This code simply counts SIGPIPEs and ignores them.
 
   However, it's not that simple - under gdb under Linux (and perhaps other
   OSes), the thread mask on a child thread disables our ability to set a
   signal handler for SIGPIPE. However, gdb seems to trap the SIGPIPE and
   reflect it to the code, even if the code wouldn't see it without the debug!
  
   Hence the multi-step code.
  
   This code SHOULD be safe.  Many other programs have had to so this.
  
   Because I'm not sure, I've put both a compile time (--enable-ignoresigpipe)
   and run-time --ignore-sigpipe option in place.
  
   Recommended:
     If you aren't seeing the "mysterious death of web server" problem:
         don't worry - be happy.
     If you are, try running for a while with --ignore-sigpipe
         If that seems to fix it, then compile with --enable-ignoressigpipe

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Older bugs (v1.3) - Unknown if these are still current
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  KNOWN_BUGS
  ==========


O1. Linux Sockets Bug (Platform Linux/i386)
   [Alan.Cox@linux.org is aware of the above issue. Status: no reply]

Below you can find the packetLogger code that can be used to
reproduce the problem. Suppose to have
host A (MAC Address 08:00:69:0B:6F:A1) and host B (MAC Address
00:20:AF:73:C6:2E). Host B is an i386 running Linux 2.X. No matter what
OS runs on A. Now start "packetLogger 08:00:69:0B:6F:A1 
00:20:AF:73:C6:2E" in order to filter packets flowing though A and B. I
suppose there's no other traffic (e.g. telnet) between A and B. Now from
A do 'ftp B' and transfer a file C (large, e.g. > 1 MB). Stop
packetLogger, look at the # of packets and restart it. Now from B do
'ftp A' and transfer the very same file C [if A and B are Linux boxes
you can start packetLogger on both hosts]. You will notice that in the
second case you've lost many packets whereas in the first case
everything works fine.

========================================
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <net/if.h>
#include <linux/if_ether.h>
#include <netinet/in.h>
#include <errno.h>
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

struct	ethernet_header {
  u_char	ether_dhost[6];
  u_char	ether_shost[6];
  u_short	ether_type;
};


char* etheraddr_string(const u_char *ep)
{
  u_int i, j;
  char *cp;
  struct enamemem *tp;
  static char buf[sizeof("00:00:00:00:00:00")];
  char hex[] = "0123456789ABCDEF";

  cp = buf;

  if ((j = *ep >> 4) != 0)
    *cp++ = hex[j];
  else
    *cp++ = '0';

  *cp++ = hex[*ep++ & 0xf];

  for(i = 5; (int)--i >= 0;) {
    *cp++ = ':';
    if ((j = *ep >> 4) != 0)
      *cp++ = hex[j];
    else
      *cp++ = '0';

    *cp++ = hex[*ep++ & 0xf];
  }

  *cp = '\0';

  return (buf);
}


int main(int argc, char* argv[]) {
  struct ifreq ifr;
  struct sockaddr sa;
  char *device = "eth0";
  unsigned long packetNum=0, totLen=0;
  int fd;

  if(argc != 3) {
    printf("Usage: %s <MAC Addr. host A> <MAC Addr. host B>\n", argv[0]);
    printf("Example: %s 08:00:69:0B:6F:A1  00:20:AF:73:C6:2E\n", argv[0]);
    return(-1);
  }

  fd = socket(PF_INET, SOCK_PACKET, htons(ETH_P_ALL));

  if (fd < 0) {
    printf("Error creating socket.\n");
    return(-1);
  }

  /* Bind to the interface name */
  memset(&sa, 0, sizeof(sa));
  sa.sa_family = AF_INET;
  (void)strncpy(sa.sa_data, device, sizeof(sa.sa_data));
  if (bind(fd, &sa, sizeof(sa))) {
    printf("bind: error\n");
    return(-1);
  }

  memset(&ifr, 0, sizeof(ifr));
  strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name));
  if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0 ) {
    printf("SIOCGIFHWADDR: error\n");
    return(-1);
  }

  /* Base the buffer size on the interface MTU */
  memset(&ifr, 0, sizeof(ifr));
  strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name));
  if (ioctl(fd, SIOCGIFMTU, &ifr) < 0 ) {
    printf("SIOCGIFMTU: error\n");
    return(-1);
  }
  
  while(1) {
    struct sockaddr from;
    int fromlen, cc, len=0;
    u_char bp[2048], srcHost[64], dstHost[64];
    struct ethernet_header *ep;

    do {
      fromlen = sizeof(from);
      cc = recvfrom(fd, bp, 2048, 0, &from, &fromlen);      
      len += cc;
    } while (strcmp(device, from.sa_data));

    ep = (struct ethernet_header*)bp;

    strcpy(srcHost, etheraddr_string(ep->ether_shost));
    strcpy(dstHost, etheraddr_string(ep->ether_dhost));


    if(strcmp(srcHost, argv[1]) && strcmp(srcHost, argv[2]))
      continue;
    else if(strcmp(dstHost, argv[1]) && strcmp(dstHost, argv[2]))
      continue;
    else {
      totLen += len;
      printf("%5d\t%8u\t%s -> %s (len=%d)\n", 
	     ++packetNum, totLen, srcHost, dstHost, len);
    }
  }

  close(fd);
  return(0);
}

========================================

O2. iPPP (Linux)
   [iPPP guys have been informed. Status: no reply]

ntop works with PPP but it presents some problems with iPPP (ISDN PPP). Some packets cannot 
be decoded properly. Tools other than ntop (e.g. tcpdump, ethereal) can't handle such packets 
either.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-