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 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.

Roy


Home | Main Index | Thread Index | Old Index