From: Xin Long <lucien.xin@gmail.com> Date: 2016-08-07 09:12:36
Prior to this patch, If one route entry's RTA_PREFSRC and RTA_GATEWAY
both were NULL, it was supposed to be restored ONLY as a local address.
But as it didn't check tb[RTA_PREFSRC] when restoring local networks,
rtattr_cmp would return a success if it was NULL, this route entry would
be restored again as a local network.
This patch is to add tb[RTA_PREFSRC] check when restoring local networks.
Fixes: 74af8dd9620e ("ip route: restore route entries in correct order")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
ip/iproute.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Phil Sutter <phil@nwl.cc> Date: 2016-08-12 15:43:48
On Sun, Aug 07, 2016 at 05:12:30PM +0800, Xin Long wrote:
Prior to this patch, If one route entry's RTA_PREFSRC and RTA_GATEWAY
both were NULL, it was supposed to be restored ONLY as a local address.
But as it didn't check tb[RTA_PREFSRC] when restoring local networks,
rtattr_cmp would return a success if it was NULL, this route entry would
be restored again as a local network.
This patch is to add tb[RTA_PREFSRC] check when restoring local networks.
Fixes: 74af8dd9620e ("ip route: restore route entries in correct order")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
From: Stephen Hemminger <stephen@networkplumber.org> Date: 2016-08-19 02:11:16
On Sun, 7 Aug 2016 17:12:30 +0800
Xin Long [off-list ref] wrote:
Prior to this patch, If one route entry's RTA_PREFSRC and RTA_GATEWAY
both were NULL, it was supposed to be restored ONLY as a local address.
But as it didn't check tb[RTA_PREFSRC] when restoring local networks,
rtattr_cmp would return a success if it was NULL, this route entry would
be restored again as a local network.
This patch is to add tb[RTA_PREFSRC] check when restoring local networks.
Fixes: 74af8dd9620e ("ip route: restore route entries in correct order")
Signed-off-by: Xin Long <lucien.xin@gmail.com>