Re: sol_socket so_bindtodevice alternative
Re: sol_socket so_bindtodevice alternative
- Subject: Re: sol_socket so_bindtodevice alternative
- From: Hado Hein <email@hidden>
- Date: Mon, 06 Jan 2014 22:02:53 +0100
On 06.01.2014, at 19:43, Vincent Lubet <email@hidden> wrote:
> With recent version of the xnu networking stack binding to an IP address does affect the routing decision. The route lookup will be restricted to route entries with the interface of the bound IP address.
>
>> The situation is:
>> pdp0 10.x.x.x with gateway
>> eth0 192.x.x.x without gateway, but with physical/layer 2 reachability for the devices which have 2.x.x.x
>>
>> Even if i bind to the eth0 ip packets will go out on pdp0 since this one has the gateway. SO_dontroute wasn’t a success also.
>
> This may be a bug or a corner case. Does this happen only on iOS?
In the long term I want to use it in one CFPlugin on all OSes.
I had the same problem on MacOS a year or two ago. The solution was to setuid on the executable and open another interface on eth (with a suitable 2.x.x.x address). I did’nt like it cause of the setuid but it worked.
I’ll investigate into recent versions of the OS - unfortunately my users (stage industry) do not update their devices OS nor their hardware. They take things they bought and run them for 15+ years (meaning G4s or first gen iPods).
I’d call this definitely a corner case. The class a output devices fed from control desks will never(™) go class c, but the control desks all use class c for their remotes.
So the users want a) remote control their desks and b) scan and configure their output devices from the same device.
Hado
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden