[squid-users] NAT loolup failed: ioctl(SIOCGNATL)

From: ahn <ahn@dont-contact.us>
Date: Sat, 18 Aug 2001 18:56:36 +0900


I wanted to test Transparent caching with Foundry Serverlron Layer4
Test machine is Solaris Sparc 64bit Processor(Solaris 8)

cc: Sun WorkShop 6 (forte)
installed squid.2.3.STABLE3

in squid.conf

http port 80
http_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

success installed ip_filter3.4.20...

in ip_nat.rules

rdr eri0 0.0.0.0/0 port 80 -> 61.33.22.48 port 80 tcp

in ipf.conf

pass in log all
pass out log all

setup Foundry Serverlron Layer4
and run squid ..port 80

look ipnat -l

List of active MAP/Redirect filters:
rdr eri0 0.0.0.0/0 port 80 -> 61.33.22.48 port 80 tcp

List of active sessions:
RDR 61.33.22.48 80 <- -> 211.32.117.15 80 [61.33.22.57 1862] <=== client request
RDR 61.33.22.48 80 <- -> 61.33.22.48 80 [61.33.22.47 1033] <=== Layer4 is health check...(active)

61.33.22.47 is Serverlron Layer4..
61.33.22.48 is Solaris8
port 80 is squid2.3.STABLE3
61.33.22.57 is client...

and..some error..

Nat lookup failed:ioctl(SIOCGNATL)...

hmmm.........

in squid source client_side.c

   2284 if ( 63 == siocgnatl_cmd) {
   2285 struct natlookup *nlp = &natLookup;
   2286 x = ioctl (natfd, SIOCGNATL, &nlp);
   2287 } else {
   2288 x = ioctl (natfd, SIOCGNATL, &natLookup);
   2289 }
   2290 if ( x < 0) {
   2291 if (errno != ESRCH) {
   2292 debug(50, 1) ("parseHttpRequest: NAT lookup failed: ioctl(SIOCGNATL)\n");
   2293 close(natfd);
   2294 natfd = -1;
   2295 dlinkDelete(&http->active,&ClientActiveRequests);
   2296 xfree(http->uri);
   2297 cbdataFree(http);
   2298 memFree(http,MEM_CLIENTHTTPREQUEST);
   2299 xfree(inbuf);
   2300 return parseHttpRequestAbort(conn, "error:nat-lookup-failed");
   2301 } else
   2302 snprintf(http->uri, url_sz, "http://%s:%d%s",
   2303 inet_ntoa(http->conn->me.sin_addr), vport, url);
   2304 } else
   2305 snprintf(http->uri, url_sz, "http://%s:%d%s", inet_ntoa(natLookup.nl_realip), vport, url);

ioctl failed...(22) Invalid argument

me debug squid

in clientReadRequest, fd : 7, size : 19
2001/08/18 18:33:23| buf->
HEAD / HTTP/1.0

2001/08/18 18:33:23| peer_addr : 61.33.22.47, peer_port : 1033
2001/08/18 18:33:23| Ahn : IPL_NAT /dev/ipnat
2001/08/18 18:33:23| Ahn : natfd 10
2001/08/18 18:33:23| Ahn: nl.nl_inport : 80
2001/08/18 18:33:23| Ahn: nl.nl_inip : 61.33.22.48
2001/08/18 18:33:23| Ahn: nl.nl_outport : 1033
2001/08/18 18:33:23| Ahn: nl.nl_outip : 61.33.22.47
2001/08/18 18:33:23| Ahn : SIOCGNATL = -107345043
2001/08/18 18:33:23| Ahn : errno number = 22
2001/08/18 18:33:23| Ahn : errno = Invalid argument
2001/08/18 18:33:23| Ahn : ioctl...result x = -1
2001/08/18 18:33:23| parseHttpRequest: NAT lookup failed: ioctl(SIOCGNATL)
2001/08/18 18:33:23| clientReadRequest: FD 7 Invalid Request

don't client request redirect..
squid is not read client request...i think ioctl failed..and SIOCGNATL is not set...
i don't know ioctl error..invaild argument

i must be success test transparent caching with solaris
please please help me....
Received on Sat Aug 18 2001 - 04:03:13 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:01:43 MST