]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Fix __ip6_route_redirect
authorMartin KaFai Lau <kafai@fb.com>
Wed, 21 Jan 2015 03:16:02 +0000 (19:16 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Jan 2015 06:09:51 +0000 (22:09 -0800)
commit6d935a1f32287c43331b552319a38082b95b3188
tree5db7467e7b5ff0163499cb807a8835642190245e
parent6954c64153ecdc5798c2415202a17cb8a7ad08ad
ipv6: Fix __ip6_route_redirect

In my last commit (fd9b6e1: ipv6: Remove BACKTRACK macro), the changes in
__ip6_route_redirect is incorrect.  The following case is missed:
1. The for loop tries to find a valid gateway rt. If it fails to find
   one, rt will be NULL.
2. When rt is NULL, it is set to the ip6_null_entry.
3. The newly added 'else if', from fd9b6e1, will stop the backtrack from
   happening.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c