Sean Boudreau(deleted)
|
Re: problem routing udp traffic out a specific interface
|
Sean Boudreau(deleted)
12/12/2008 1:14 PM
post18539
|
Re: problem routing udp traffic out a specific interface
IIRC routing is still consulted. Where are you trying to send
to? It could be the route points out the mos0 iface or no
route at all. You could also try the SO_DONTROUTE option.
-seanb
On Fri, Dec 12, 2008 at 01:02:13PM -0500, Gary Faulkner wrote:
> We have a strange problem that we're hoping to get some help with. We have the following scenario:
>
> # route show
> Routing tables
>
> Internet:
> Destination Gateway Flags
> default 192.168.99.1 UG
> 10.0.0.1 10.68.0.89 UH
> localhost.localdom 127.0.0.1 UH
> 192.168.99.0/24 link#2 U
> 192.168.99.1 00:1a:e2:06:9b:f9 UHL
>
> Our network interfaces are as follows:
>
> # ifconfig -a
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
> inet 127.0.0.1 netmask 0xff000000
> mos0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> address: 00:18:5a:81:06:0c
> media: Ethernet autoselect (100baseTX full-duplex)
> status: active
> inet 192.168.99.166 netmask 0xffffff00 broadcast 192.168.99.255
> ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1600
> inet 10.68.0.89 -> 10.0.0.1 netmask 0xff000000
>
> We have a UDP socket that we want to send/recv on, but we only want that traffic to go over the ppp0 interface. We're
using SO_BINDTODEVICE, and have also called bind() on the socket to bind it to only the ppp0 ip addr.
>
> However, when we try to call sendto() on the socket, we get no route to host. Specifically, we're sending to an ip
address that is not on either of the directly attached networks.
>
> From my read on the docs though, this should work; the udp packets should be sent out the ppp0 interface, because of
the binding and the use of the SO_BINDTODEVICE socket option.
>
> What am I missing?
>
> -garyf
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post18533
>
|
|
|