Routing IPv6 packets towards oneself with routing sockets?

Hiroki Sato hrs at FreeBSD.org
Thu Aug 7 10:24:36 UTC 2014


Hi,

Fernando Gont <fernando at gont.com.ar> wrote
  in <53E2B586.3080700 at gont.com.ar>:

fe> However, whenever I lookup an entry for fc00:1::1 with routing sockets,
fe> the only entry I obtain is fc00:1::/64 (a network route) rather than
fe> fc00:1::1/128 (a host route). As a result, I kind of have to figure out
fe> that since fc00:1::1 is my own address, I must override whatever I
fe> learned via routing sockets, and just send my packets to loopback.
fe>
fe> I would assume that I must be doing something wrong, since I would
fe> expect the host-specific route (i.e. longest-matching route) to be route
fe> learned via routing sockets. And that I shouldn't be implementing this
fe> "is the dst address my own address?" hack.
fe>
fe> Any thoughts?
fe>
fe> P.S.: I can provide a code snippet if that'd be of any help.

 RTM_GET should return fc00:1::1/128 with ifp == lo0.  Can you show
 the code you are using?

-- Hiroki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20140807/09376382/attachment.sig>


More information about the freebsd-net mailing list