diff options
author | David Ahern <dsahern@gmail.com> | 2019-04-06 01:30:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-09 00:22:40 +0200 |
commit | 1550c171935d264f522581fd037db5e64a716bb6 (patch) | |
tree | c043f42751289b3cb3a93e0a5f883a6d086240f4 /net/atm | |
parent | net: Replace nhc_has_gw with nhc_gw_family (diff) | |
download | linux-1550c171935d264f522581fd037db5e64a716bb6.tar.xz linux-1550c171935d264f522581fd037db5e64a716bb6.zip |
ipv4: Prepare rtable for IPv6 gateway
To allow the gateway to be either an IPv4 or IPv6 address, remove
rt_uses_gateway from rtable and replace with rt_gw_family. If
rt_gw_family is set it implies rt_uses_gateway. Rename rt_gateway
to rt_gw4 to represent the IPv4 version.
Signed-off-by: David Ahern <dsahern@gmail.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm')
-rw-r--r-- | net/atm/clip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/atm/clip.c b/net/atm/clip.c index d795b9c5aea4..b9e67e589a7b 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c @@ -345,8 +345,8 @@ static netdev_tx_t clip_start_xmit(struct sk_buff *skb, return NETDEV_TX_OK; } rt = (struct rtable *) dst; - if (rt->rt_gateway) - daddr = &rt->rt_gateway; + if (rt->rt_gw_family == AF_INET) + daddr = &rt->rt_gw4; else daddr = &ip_hdr(skb)->daddr; n = dst_neigh_lookup(dst, daddr); |