Hello,

I ran into an interesting problem trying to port some code to linux
and thinking about it a bit, I am not sure which has the more
desirable behavior: linux or openbsd.

Say host "h1" starts exchanging some packets with host "h2", which is
on a remote network ("n2"). As this is going on, "h1" establishes a
ppp connection where "h3" is the remote end point (and also in network
"n2"). There is a route added for "n2" with gateway "h3". so from this
point on, any traffic to any host within "n2" will/should go through
the ppp interface. right?

netstat -rnfinet shows:
...
1x8.18x.200/23     1x8.18x.201.136    UGS        0        0     -     8 ppp0
1x8.18x.201.136    1x8.18x.201.132    UH         1        0     -     4 ppp0
...

Where 1x8.18x.201.132 is the local ip assigned to "h1" via ppp and
1x8.18x.201.136 is the remote host ("h3") ip (and gateway for "n2").


Sending further packets, using the same socket descriptor, from "h1"
to "h2" should go through which interface? the ppp interface or the
real physical interface which was being used prior to the ppp
connection (xl0, etc.)?

openbsd and linux seem to behave differently (a shocker, I am sure).
in linux, any further traffic between "h1" and "h2" is now routed
through the ppp interface. however, in openbsd the packets continue
being sent over the same initial interface.

to solve the (my?) "problem" on linux, i have to add a static route to
"h2" specifying the default gateway for "h1's" network (not "h3").

--patrick

Reply via email to