Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jun 2002 21:37:19 -0600 (MDT)
From:      Mike Holling <myke@ees.com>
To:        ports@freebsd.org
Subject:   fixing macipgw port
Message-ID:  <20020606212728.Q461-100000@av.fks.lan>

next in thread | raw e-mail | index | archive | help
I've got a client who actually still wants to network some old macs with
phonenet, so I'm trying to revive the macipgw port.  It didn't compile
because the interface to netatalk changed slighty.  Adding a few NULL
arguments and renaming two external functions was enough to make it
compile again.  However, when it runs it's not setting the routes
correctly.  Here are the relevant routing entries from a 2.2.6 machine
where the app still works, with macipgw using 192.168.4.0/24 for its ip
range:

Destination        Gateway            Flags     Refs     Use     Netif
192.168.4.0        192.168.4.1        UH          0        0      tun0 =>
192.168.4          192.168.4.1        UGSc        0        0      tun0
192.168.4.1/32     127.0.0.1          UGSc        1        0       lo0

Here's what happens on my 4.5-RELEASE development box:

Destination        Gateway            Flags    Refs      Use  Netif Expire
192.168.4.0        192.168.4.1        UH          0        0   tun0 =>
192.168.4          192.168.4.1        UGSc        0        0    lo0
192.168.4.1/32     127.0.0.1          UGSc        1        0    lo0

The route for 192.168.4 now goes to lo0 instead of tun0, and the packets
loop when trying to send back to the mac.  I managed to get it to work by
doing:

ifconfig tun0 192.168.4.1 192.168.4.254
route delete 192.168.4.0
route add 192.168.4.0 192.168.4.254

This is a pretty nasty kludge though.  I looked at tunnel.c where the
routes are set but I'm not familiar enough with the routing interface to
see any immediate problems.  If someone knows what might have changed here
between 2.x and 4.x I could probably get this port properly working again.
The code in macipgw hasn't changed for a long time so something probably
changed in the way the routing code works.  Maybe macipgw was relying on
some default behavior that's different now.

- Mike



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020606212728.Q461-100000>