tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: IP_PKTINFO, sendmsg(2) and routing.
Dennis Ferguson <dennis.c.ferguson%gmail.com@localhost> writes:
> 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 believe I was the last person to make significant changes to this
code, about a year ago. The plan for my changes back then is here:
https://mail-index.netbsd.org/tech-net/2017/12/28/msg006579.html
...and the completed result was presented here:
https://mail-index.netbsd.org/tech-net/2017/12/31/msg006591.html
The bit that does the actual work on an outgoing packet is the function
ip_pktinfo_prepare() in sys/netinet/ip_output.c. The way it is now
works for all the software I've seen that uses it, but I've never seen
those *_DONTROUTE options used. Note, though, that we set the
IP_ROUTETOIFINDEX flag if an interface was specified, and I believe this
ends up doing what you say it should.
If you can point me to some clear information on how IP_PKTINFO should
behave in various configurations of multi-homed machines, to satisfy
routing protocol implementations, I'd love to play with it, and get our
implementation to do the right thing.
-tih
--
Most people who graduate with CS degrees don't understand the significance
of Lisp. Lisp is the most important idea in computer science. --Alan Kay
Home |
Main Index |
Thread Index |
Old Index