🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: mod.protocols.appletalk
Article #61

patch for rerouted packets and ktalk prompt

#61
From: cck
Date: Sun, 18 May 1986 20:34
48 lines
2078 bytes
Two things.  First, I found a better patch for routeip which follows.
Second, people should note that the newest version of the udp gateway
software doesn't allow you do a "find gateways" from prompt after the
gateway has started (e.g. you have to do a power cycle to catch it's
attention).  I assume this was done purposely.  If you need to allow
this (like we do), then patch the code in abreceive for packet type
'K' so it doesn't do any checking before calling K_KLAP, etc.

Diffs are based on the code as it came from the users group.

***************
*** 584,589
   * If a routing table existed within the gateway, it would determine
   * which interface pointer (ifp) and destination address (dst below)
   * are passed to ifp->if_output.
   */
  routeip(p)
  	register struct pbuf *p;

--- 593,602 -----
   * If a routing table existed within the gateway, it would determine
   * which interface pointer (ifp) and destination address (dst below)
   * are passed to ifp->if_output.
+  *
+  * Don't send a packet back out on the same interface it came in on.
+  * Should work for multiple ethernet interfaces.  Charlie C. Kim
+  *
   */
  routeip(p)
  	register struct pbuf *p;
***************
*** 624,629
  			dst = iproutedef;
  	}
  out:
  	(*ifp->if_output)(ifp, p, AF_IP, &dst);
  	return;
  drop:

--- 637,644 -----
  			dst = iproutedef;
  	}
  out:
+ 	if (p_if(p) == ifp)
+ 	  goto drop;
  	(*ifp->if_output)(ifp, p, AF_IP, &dst);
  	return;
  drop:
Technical Details
Message-ID: <8605200519.AA26925@ucbvax.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!decvax!decwrl!ucbvax!CUCCA.COLUMBIA.EDU!cck

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!decvax!decwrl!ucbvax!CUCCA.COLUMBIA.EDU!cck
From: cck@CUCCA.COLUMBIA.EDU.UUCP
Newsgroups: mod.protocols.appletalk
Subject: patch for rerouted packets and ktalk prompt
Message-ID: <8605200519.AA26925@ucbvax.Berkeley.EDU>
Date: Sun, 18-May-86 16:34:16 EDT
Article-I.D.: ucbvax.8605200519.AA26925
Posted: Sun May 18 16:34:16 1986
Date-Received: Tue, 20-May-86 20:43:51 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 48
Approved: info-applebus@c.cs.cmu.edu