* [PATCH net v2] ipv6: Allow IPv4-mapped address as next-hop
@ 2016-12-04 4:57 Erik Nordmark
2016-12-05 19:52 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Erik Nordmark @ 2016-12-04 4:57 UTC (permalink / raw)
To: davem, nordmark; +Cc: netdev, Bob Gilligan
Made kernel accept IPv6 routes with IPv4-mapped address as next-hop.
It is possible to configure IP interfaces with IPv4-mapped addresses, and
one can add IPv6 routes for IPv4-mapped destinations/prefixes, yet prior
to this fix the kernel returned an EINVAL when attempting to add an IPv6
route with an IPv4-mapped address as a nexthop/gateway.
RFC 4798 (a proposed standard RFC) uses IPv4-mapped addresses as nexthops,
thus in order to support that type of address configuration the kernel
needs to allow IPv4-mapped addresses as nexthops.
Signed-off-by: Erik Nordmark <nordmark@arista.com>
Signed-off-by: Bob Gilligan <gilligan@arista.com>
---
v2 honoring minimum 1000 ft vertical separation between Thunderbird and patches (fixed whitespace issues)
net/ipv6/route.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 1b57e11..86bdb02 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1995,8 +1995,11 @@ static struct rt6_info *ip6_route_info_create(struct fib6_config *cfg)
It is very good, but in some (rare!) circumstances
(SIT, PtP, NBMA NOARP links) it is handy to allow
some exceptions. --ANK
+ We allow IPv4-mapped nexthops to support RFC4798-type
+ addressing
*/
- if (!(gwa_type & IPV6_ADDR_UNICAST))
+ if (!(gwa_type & (IPV6_ADDR_UNICAST |
+ IPV6_ADDR_MAPPED)))
goto out;
if (cfg->fc_table) {
--
1.8.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net v2] ipv6: Allow IPv4-mapped address as next-hop
2016-12-04 4:57 [PATCH net v2] ipv6: Allow IPv4-mapped address as next-hop Erik Nordmark
@ 2016-12-05 19:52 ` David Miller
2016-12-06 6:08 ` Erik Nordmark
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2016-12-05 19:52 UTC (permalink / raw)
To: nordmark; +Cc: netdev, gilligan
From: Erik Nordmark <nordmark@arista.com>
Date: Sat, 3 Dec 2016 20:57:09 -0800
> Made kernel accept IPv6 routes with IPv4-mapped address as next-hop.
>
> It is possible to configure IP interfaces with IPv4-mapped addresses, and
> one can add IPv6 routes for IPv4-mapped destinations/prefixes, yet prior
> to this fix the kernel returned an EINVAL when attempting to add an IPv6
> route with an IPv4-mapped address as a nexthop/gateway.
>
> RFC 4798 (a proposed standard RFC) uses IPv4-mapped addresses as nexthops,
> thus in order to support that type of address configuration the kernel
> needs to allow IPv4-mapped addresses as nexthops.
>
> Signed-off-by: Erik Nordmark <nordmark@arista.com>
> Signed-off-by: Bob Gilligan <gilligan@arista.com>
Applied to net-next, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net v2] ipv6: Allow IPv4-mapped address as next-hop
2016-12-05 19:52 ` David Miller
@ 2016-12-06 6:08 ` Erik Nordmark
0 siblings, 0 replies; 3+ messages in thread
From: Erik Nordmark @ 2016-12-06 6:08 UTC (permalink / raw)
To: David Miller, nordmark; +Cc: netdev, gilligan
On 12/5/16 11:52 AM, David Miller wrote:
> From: Erik Nordmark <nordmark@arista.com>
> Date: Sat, 3 Dec 2016 20:57:09 -0800
>
>> Made kernel accept IPv6 routes with IPv4-mapped address as next-hop.
>>
>> It is possible to configure IP interfaces with IPv4-mapped addresses, and
>> one can add IPv6 routes for IPv4-mapped destinations/prefixes, yet prior
>> to this fix the kernel returned an EINVAL when attempting to add an IPv6
>> route with an IPv4-mapped address as a nexthop/gateway.
>>
>> RFC 4798 (a proposed standard RFC) uses IPv4-mapped addresses as nexthops,
>> thus in order to support that type of address configuration the kernel
>> needs to allow IPv4-mapped addresses as nexthops.
>>
>> Signed-off-by: Erik Nordmark <nordmark@arista.com>
>> Signed-off-by: Bob Gilligan <gilligan@arista.com>
> Applied to net-next, thanks.
>
Thanks, especially for moving it from net to net-next.
I guess I don't fully understand what is considered a bug fix for net as
opposed to new stuff for net-next. Is the former mostly for regressions
and serious bugs? This was a fix for a bug that's been there since the
beginning of IPv6 time AFAICT.
Erik
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-06 6:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-04 4:57 [PATCH net v2] ipv6: Allow IPv4-mapped address as next-hop Erik Nordmark
2016-12-05 19:52 ` David Miller
2016-12-06 6:08 ` Erik Nordmark
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).