David Ahern
7c74b0bec9
ipv4: Update fib_select_default to handle nexthop objects
...
A user reported [0] hitting the WARN_ON in fib_info_nh:
[ 8633.839816] ------------[ cut here ]------------
[ 8633.839819] WARNING: CPU: 0 PID: 1719 at include/net/nexthop.h:251 fib_select_path+0x303/0x381
...
[ 8633.839846] RIP: 0010:fib_select_path+0x303/0x381
...
[ 8633.839848] RSP: 0018:ffffb04d407f7d00 EFLAGS: 00010286
[ 8633.839850] RAX: 0000000000000000 RBX: ffff9460b9897ee8 RCX: 00000000000000fe
[ 8633.839851] RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000000000000000
[ 8633.839852] RBP: ffff946076049850 R08: 0000000059263a83 R09: ffff9460840e4000
[ 8633.839853] R10: 0000000000000014 R11: 0000000000000000 R12: ffffb04d407f7dc0
[ 8633.839854] R13: ffffffffa4ce3240 R14: 0000000000000000 R15: ffff9460b7681f60
[ 8633.839857] FS: 00007fcac2e02700(0000) GS:ffff9460bdc00000(0000) knlGS:0000000000000000
[ 8633.839858] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 8633.839859] CR2: 00007f27beb77e28 CR3: 0000000077734000 CR4: 00000000000006f0
[ 8633.839867] Call Trace:
[ 8633.839871] ip_route_output_key_hash_rcu+0x421/0x890
[ 8633.839873] ip_route_output_key_hash+0x5e/0x80
[ 8633.839876] ip_route_output_flow+0x1a/0x50
[ 8633.839878] __ip4_datagram_connect+0x154/0x310
[ 8633.839880] ip4_datagram_connect+0x28/0x40
[ 8633.839882] __sys_connect+0xd6/0x100
...
The WARN_ON is triggered in fib_select_default which is invoked when
there are multiple default routes. Update the function to use
fib_info_nhc and convert the nexthop checks to use fib_nh_common.
Add test case that covers the affected code path.
[0] https://github.com/FRRouting/frr/issues/6089
Fixes: 493ced1ac47c ("ipv4: Allow routes to use nexthop objects")
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-22 19:57:39 -07:00
..
2019-05-21 12:33:38 -07:00
2020-03-15 15:20:16 +01:00
2020-03-29 22:14:49 -07:00
2020-03-12 15:55:00 -07:00
2020-03-12 15:55:00 -07:00
2020-03-30 19:52:37 -07:00
2020-02-22 21:45:55 -08:00
2019-11-01 14:57:52 -07:00
2020-04-09 10:27:23 -07:00
2020-03-26 14:51:07 +01:00
2020-02-19 13:52:32 +01:00
2020-03-23 20:59:40 -07:00
2020-03-29 22:30:57 -07:00
2019-10-04 11:10:56 -07:00
2019-10-04 11:10:56 -07:00
2020-04-22 19:57:39 -07:00
2020-03-30 20:48:43 -07:00
2020-01-23 14:32:52 +01:00
2020-03-08 21:25:37 -07:00
2020-01-03 12:24:34 -08:00
2020-03-12 15:55:00 -07:00
2020-02-23 21:15:36 -08:00
2020-03-12 22:34:48 -07:00
2020-03-12 22:34:48 -07:00
2019-08-08 15:55:10 -07:00
2019-12-13 21:40:49 -08:00
2019-05-21 10:50:45 +02:00
2019-11-07 16:15:56 -08:00
2019-09-20 18:23:33 -07:00
2019-08-08 15:55:10 -07:00
2020-03-16 17:19:56 -07:00
2020-03-30 13:45:04 -07:00
2019-06-21 18:35:51 +02:00
2020-03-29 21:53:18 -07:00
2019-05-25 11:00:50 -07:00
2020-03-29 22:30:57 -07:00
2020-03-29 22:16:27 -07:00
2020-02-06 13:27:30 +01:00
2019-07-05 15:01:15 -07:00
2020-03-02 13:11:46 -07:00
2019-07-25 17:23:40 -07:00
2019-10-04 11:10:56 -07:00
2020-03-12 15:55:00 -07:00
2020-03-30 12:45:23 -07:00
2020-03-09 22:34:58 +01:00
2019-05-21 10:50:45 +02:00
2019-01-28 11:32:58 +01:00
2019-05-21 10:50:45 +02:00
2020-03-12 15:55:00 -07:00
2019-09-13 21:44:19 +02:00
2020-03-29 22:14:49 -07:00
2019-05-30 11:26:32 -07:00
2020-03-12 22:34:48 -07:00
2020-03-11 23:19:40 -07:00
2020-03-23 21:57:44 -07:00
2020-01-29 17:45:20 +01:00
2020-03-12 12:08:09 -07:00
2020-01-21 10:45:49 +01:00
2020-03-16 18:26:54 -07:00
2020-03-20 15:56:55 +01:00
2019-05-21 10:50:45 +02:00
2020-01-09 08:46:18 -08:00
2019-12-30 14:44:27 -08:00
2019-05-30 11:26:32 -07:00
2018-10-10 22:26:00 -07:00
2020-02-27 18:50:19 -08:00
2019-10-25 19:25:37 -07:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2020-03-12 15:55:00 -07:00
2020-03-12 15:55:00 -07:00
2019-05-21 10:50:45 +02:00
2019-12-09 20:17:48 -08:00
2020-03-29 22:14:48 -07:00
2019-05-21 10:50:45 +02:00
2019-05-30 11:26:32 -07:00
2020-03-20 19:36:38 -07:00
2019-05-21 10:50:45 +02:00
2018-09-21 19:37:59 -07:00
2020-03-16 18:26:54 -07:00
2020-01-26 15:28:47 +01:00
2020-03-09 22:34:58 +01:00
2019-05-21 10:50:45 +02:00
2020-03-16 18:26:55 -07:00
2019-05-21 10:50:45 +02:00
2020-03-16 18:26:55 -07:00
2020-03-25 18:58:11 -07:00
2019-05-21 10:50:45 +02:00
2020-03-09 22:34:58 +01:00
2020-03-12 22:34:48 -07:00
2019-01-17 15:01:08 -08:00
2020-03-30 10:35:03 -07:00
2019-05-21 10:50:45 +02:00
2020-03-30 19:52:37 -07:00
2019-05-30 11:26:32 -07:00
2018-09-04 10:26:30 +02:00
2020-04-22 12:32:11 -07:00
2019-12-24 22:28:54 -08:00
2019-12-09 09:59:07 +01:00
2019-06-06 08:34:50 +02:00
2019-06-06 08:34:50 +02:00