mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
f35b794b3b
commit
0f5f7d7bf6
5 changed files with 38 additions and 8 deletions
|
|
@ -141,8 +141,9 @@ static int mpls_xmit(struct sk_buff *skb)
|
|||
if (rt->rt_gw_family == AF_INET)
|
||||
err = neigh_xmit(NEIGH_ARP_TABLE, out_dev, &rt->rt_gw4,
|
||||
skb);
|
||||
else
|
||||
err = -EAFNOSUPPORT;
|
||||
else if (rt->rt_gw_family == AF_INET6)
|
||||
err = neigh_xmit(NEIGH_ND_TABLE, out_dev, &rt->rt_gw6,
|
||||
skb);
|
||||
} else if (rt6) {
|
||||
if (ipv6_addr_v4mapped(&rt6->rt6i_gateway)) {
|
||||
/* 6PE (RFC 4798) */
|
||||
|
|
|
|||
Loading…
Reference in a new issue