Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - packet filter problem: (4 Items)
   
packet filter problem  
I have a system with two (or more) CPUs. The first (master) CPU is on our building network and the second (slave) CPU is
 on a private network implemented over PCI express. I can telnet from the master to the slave and visa-versa where 
telnet is invoked from RS-232 console connections to each CPU.

Now I'd like to access the slave CPU from an external computer on the network that the master CPU is connected to.  I've
 enabled packet filtering on the master by:

   mount -Tio-pkt /proc/boot/lsm-pf-v4.so
   sysctl -w net.inet.ip.forwarding=1
   pfctl -f pf.conf -e

where pf.conf contains:

  rdr on wm0 proto tcp from any to \
    141.121.191.201 port 2308 -> 10.1.8.108 port 23

141.121.191.201 is the ethernet  IP address of the master CPU and 10.1.8.108 is the IP address of the slave CPU.

Now from a PC I can 'telnet 141.121.201 2308' and I get the login prompt for a telnet session on the slave CPU (via the 
port redirection).  Works fine.  Now in the session I execute 'ls' and get the correct directory output.  

But, if I execute 'ls -R' I only get one line of output back to the PC. I don't get all the data and I never get the 
next telnet console prompt.

If I telnet from the PC to the master CPU and do the same I get all the data so it seems like the packet filtering is 
somehow getting hung up.

If I execute 'netstat -a' on the slave CPU I get:
  # netstat -a
  Active Internet connections (including servers)
  Proto Recv-Q Send-Q  Local Address          Foreign Address        State
  tcp        0   2835  10.1.8.108.telnet      141.121.191.243.63483  ESTABLISHED

which seems to indicate that the data is somehow still in slave CPU buffers.

Any ideas on how to fix or debug this problem?  Note that I'm running 6.4.1 code.

Thanks,
Gary


Re: packet filter problem  
Can the packet filter deal with different MTU sizes?  My ethernet size has the default size of 1500 but my PCI express 
side uses 8100 bytes.
Re: packet filter problem  
Another test -- I created a file on the slave CPU that contains 76 characters.  When I telnet to the slave from the PC 
(via master CPU port forwarding) I can 'cat' the file from the slave just fine.  If I add one character to the file and 
try to 'cat' the file I get nothing back at the PC.  

What mechanism could be coming into play when going from a 76 to 77 character transfer?
Re: packet filter problem  
I added a slogf call in my PCI express LAN driver to see what's going on at the telnet server end on the slave CPU.  
When the telnet session hangs, the LAN driver on the slave is periodically re-trying to send a 145 byte packet to the 
master CPU.  It looks like it gives up after 12 retries.

Another observation that I don't understand -- the sizes of the packets sent from the slave (telnet server) to the 
master are larger when the telnet client is accessing the slave via the Ethernet LAN and through the packet filter.