tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: IP_PKTINFO, sendmsg(2) and routing.
On Tue, Feb 12, 2019 at 11:10:28AM +0000, Roy Marples wrote:
> On 08/02/2019 22:50, Dennis Ferguson wrote:
> >It should send the packet out the IP_PKTINFO interface if packet is sent
> >with MSG_DONTROUTE/SO_DONTROUTE. If this isn’t working it should probably
> >be made to, routing protocols in general depend on being able to do that.
>
> I don't see how the two are related.
> Routing can still be obeyed to an extent.
> Consider the following
>
> Interface A has 192.168.0.1/24
> Interface B has 192.168.0.2/24
> The subnet 192.168/24 belongs to interface A
> There is a default route to 192.168.0.10, again on interface A
>
> If I sent a packet to 1.2.3.4 and IP_PKTINFO says use interface B I
> would expect the packet to be sent to the default router of
> 192.168.0.10 but exit via interface B and not interface A.
If you don't use _DONTROUTE, then I would *hope* for the transmission to
fail with an error, probably EHOSTUNREACH, if 1.2.3.4 has no route on
interface B. However, today I sort of *expect* for the transmission to
go out interface A, since the nexthop and its link-layer information are
on interface A.
Dave
--
David Young
dyoung%pobox.com@localhost Urbana, IL (217) 721-9981
Home |
Main Index |
Thread Index |
Old Index