Subject: Re: Current kernel has routing problems?
To: Wiker, Raymond <etorwi@eto.ericsson.se>
From: Dave Huang <khym@bga.com>
List: current-users
Date: 10/16/1996 06:26:54
On Wed, 16 Oct 1996, Wiker, Raymond wrote:
> 	I saw something similar last night, on
> FreeBSD-2.2-960801-SNAP. I solved it by adding the files
> /etc/ppp/ip-up and /etc/ppp/ip-down - something like the below:

As you may have seen in my previous message to current-users, switching
back to the routed that comes with NetBSD 1.2 fixed the problem for me... 
and after looking at the sources some, it looks like either NetBSD or
routed is doing something wrong :) Although since nobody has noticed this
under NetBSD except me, it might be me that's doing something wrong... :)

Anyways, in routed's rdist.c, set_rdisc_mg(), it does an IP_ADD_MEMBERSHIP
setsockopt(), with the imr_interface field in struct ip_mreq set to the
destination address of a point to point interface. However, the docs for
IP_ADD_MEMBERSHIP in ip(4) claim that imr_interface should be the address
of the interface itself, and src/sys/netinet/ip_output.c seems to say the
same thing.

Now, routed's defs.h has this:
/* Turn on if IP_DROP_MEMBERSHIP and IP_ADD_MEMBERSHIP do not look at
 * the dstaddr of point-to-point interfaces.
 */
/* #define MCAST_PPP_BUG */

I tried uncommenting the #define, but I still had problems...

> 	BTW: Is there a way to set up pppd with demand-dialling and a
> variable remote address? I.e, something like

I dunno, I tried and couldn't get it to work... the description in the
pppd manpage for the demand options says that the remote address must be
specified, which sorta implies that the local address needn't be. But
apparently things don't work that way :)

> 	Maybe you should take a look at the output from "netstat -r",
> and see if there is a route for multicast traffic? If you're not
> actually planning to use multicast, you should remove the option from
> the config file, and disable the multicast-related magic from
> /etc/netstart. 

netstat -r doesn't show any multicast routes, and I don't want to do
multicast. Routed seems to insist on doing multicast stuff though, since
all of my network interfaces have the multicast flag set:

ep0: flags=b863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,LINK0,LINK1,MULTICAST>
ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST>

(why is that, anyways? Is there a way to turn multicast off?)
-- 
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet: khym@bga.com   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 20 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++