Zhenlei Huang 62e1a437f3 routing: Allow using IPv6 next-hops for IPv4 routes (RFC 5549).
Implement kernel support for RFC 5549/8950.

* Relax control plane restrictions and allow specifying IPv6 gateways
 for IPv4 routes. This behavior is controlled by the
 net.route.rib_route_ipv6_nexthop sysctl (on by default).

* Always pass final destination in ro->ro_dst in ip_forward().

* Use ro->ro_dst to exract packet family inside if_output() routines.
 Consistently use RO_GET_FAMILY() macro to handle ro=NULL case.

* Pass extracted family to nd6_resolve() to get the LLE with proper encap.
 It leverages recent lltable changes committed in c541bd368f86.

Presence of the functionality can be checked using ipv4_rfc5549_support feature(3).
Example usage:
  route add -net 192.0.0.0/24 -inet6 fe80::5054:ff:fe14:e319%vtnet0

Differential Revision: https://reviews.freebsd.org/D30398
MFC after:	2 weeks
2021-08-22 22:56:08 +00:00
..
2021-06-11 15:40:34 +02:00
2021-08-08 10:16:06 +02:00
2020-11-29 13:41:49 +00:00
2021-07-07 07:22:35 -04:00
2020-11-22 20:21:10 +00:00
2021-02-25 10:13:52 +01:00
2019-12-06 16:35:48 +00:00
2021-07-28 09:35:09 -07:00
2019-10-07 22:40:05 +00:00
2021-08-13 11:06:17 +02:00
2021-05-31 05:48:15 +02:00
2021-08-09 12:01:46 +02:00
2020-09-24 12:26:06 +00:00
2020-09-24 12:26:06 +00:00
2020-09-24 12:26:06 +00:00
2021-01-24 00:07:41 +01:00
2021-07-08 08:16:45 -04:00
2021-07-07 07:22:35 -04:00
2021-02-18 22:36:01 -06:00