[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Genera 7: tcp-ip subnetting and terminal emulator problems



    Date: Fri, 20 Feb 87 12:30:20 PST
    From: braver@renoir.Berkeley.EDU (Michael Braverman)

    I just brought Genera 7.0 up on a pre-existing 6.1 system and
    the internet subnetting stopped working.  The Peek window lists
    all of the right gateway machines under the interfaces
    heading, but it also shows that everything is being routed via LOCAL
    (under the subnet routing heading).  As a result, the machine is trying
    (unsucessfully) to connect directly to all other machines without routing
    through the gateway machines.  Poking through the ip-tcp source code,
    there seems to be an undocumented user-property that can be put on the
    network object to specify subnetting routes, however the code that
    uses the property doesn't make any sense to me.  Does anyone have a
    patch for this problem?  Is there a special addition I should have
    made to the namespace for Genera 7.0?

What you probably want to do is put on the namespace object for the NETWORK
object named INTERNET the user property:

USER-PROPERTY INTERNET-SUBNET-MASKS "((\"128.32.0.0\" \"255.255.255.0\"))"

and then do a :Reset Network. You might have to redump your world load after
you have changed the namespace to make IP-TCP come up right every time you
boot your machine.

In addition, there's a bug in IP-TCP that after you have put this user
property on the Internet network object and reset you network if there appears
any packets on the local ethernet with an address 128.32.0.0 or 128.32.255.255
in either the source or desitination field of the packet, your machine will
drop into the cold load stream. Here's a patch to avoid that:

;;; -*- Mode: LISP; Syntax: Common-lisp; Package: ZL-USER; Base: 10; Patch-File: T; Lowercase: Yes -*-

;=====================================
(SYSTEM-INTERNALS:BEGIN-PATCH-SECTION)
(SYSTEM-INTERNALS:PATCH-SECTION-SOURCE-FILE "SYS:IP-TCP;IP-ROUTING.LISP.93")
(SYSTEM-INTERNALS:PATCH-SECTION-ATTRIBUTES
  "-*- Mode: Lisp; Package: TCP; Lowercase: Yes; Syntax: Common-lisp -*-")

(defun-in-flavor (ip-get-subnet ip-protocol) (address)
  (let* ((number (internet-subnet-number address))
	 (entry (gethash number subnet-hash-table)))
    (when (integerp entry)
      (setf number (logand address entry))
      (setf entry (gethash number subnet-hash-table)))
    (if (numberp entry)
	;;; Well, this is bogus. We've been handed an address that's in the subnet-hash-table,
	;;; but the entry is a number, indicating that the address is the subnet number
	;;; of a subnetted network. We're never supposed to see such a thing here, but since
	;;; Packets on the ethernet can have pretty much arbitrary addresses in them,
	;;; (ARP packets, for example, from some other broken machine)
	;;; and we get called in the scheduler from the ethernet receiver process, 
	;;; We shouldn't just return this number, because some other function will blow out,
	;;; and we shouldn't blow out, because it's not a very robust thing to do.
	;;; Instead, we should come up with some reasonable thing to return and hope for the
	;;; best. Let's be arbitrary and return the subnet for the address 
	;;; of one of our interfaces that is on the network that is subnetted.
	;;; If that fails, return the subnet of any of our interfaces.
	(loop for interface in interface-list
	      for interface-address = (ip-interface-local-address interface)
	      when (compare-internet-address
		     address (internet-address-mask address interface-address 0))
		return (ip-get-subnet interface-address)
	      finally (return (ip-get-subnet interface-address)))
	(or entry
	    (let ((new-subnet
		    (if (rest interface-list)
			;; This is a gateway
			(let ((default-network
				(send network :user-get :internet-default-routing-network)))
			  (when default-network
			    (let ((default-number (parse-internet-address default-network)))
			      (unless (= default-number number)
				(let ((default-subnet
					(gethash default-number subnet-hash-table)))
				  (when default-subnet
				    (make-ip-subnet
				      :ip self :number number
				      :gateways (ip-subnet-gateways default-subnet))))))))
			;; this isn't a gateway
			(when (ip-interface-prime-gateways (first interface-list))
			  (make-ip-subnet
			    :ip self :number number
			    :gateways (loop for gateway in (ip-interface-prime-gateways
							     (first interface-list))
					    collect (list gateway 1002)))))))
	      (when new-subnet
		(setf (gethash number subnet-hash-table) new-subnet))
	      new-subnet)))))

    Also, the telnet window's emulation of a vt100 is horrible.  Is there
    a patch for that too?

I don't have any, but I know that the aaa emulation works better. 

The best thing to do is to get tcp supdup working on the unix you want to
talk to. You can get a copy of a supdup server and user program from the file
pub/supdup.tar on hermes.ai.mit.edu using ftp. Or even get a copy of x-windows
for the lisp machine, mentioned a few weeks ago on this mailing list.