ipv4: Add support to rtable for ipv6 gateway
Add support for an IPv6 gateway to rtable. Since a gateway is either IPv4 or IPv6, make it a union with rt_gw4 where rt_gw_family decides which address is in use. When dumping the route data, encode an ipv6 nexthop using RTA_VIA. Signed-off-by: David Ahern <dsahern@gmail.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
f35b794b3b
commit
0f5f7d7bf6
@@ -60,7 +60,10 @@ struct rtable {
|
||||
int rt_iif;
|
||||
|
||||
/* Info on neighbour */
|
||||
__be32 rt_gw4;
|
||||
union {
|
||||
__be32 rt_gw4;
|
||||
struct in6_addr rt_gw6;
|
||||
};
|
||||
|
||||
/* Miscellaneous cached information */
|
||||
u32 rt_mtu_locked:1,
|
||||
|
Reference in New Issue
Block a user