Mike Manning
944fd1aeac
net: allow unbound socket for packets in VRF when tcp_l3mdev_accept set
...
The commit 3c82a21f4320 ("net: allow binding socket in a VRF when
there's an unbound socket") changed the inet socket lookup to avoid
packets in a VRF from matching an unbound socket. This is to ensure the
necessary isolation between the default and other VRFs for routing and
forwarding. VRF-unaware processes running in the default VRF cannot
access another VRF and have to be run with 'ip vrf exec <vrf>'. This is
to be expected with tcp_l3mdev_accept disabled, but could be reallowed
when this sysctl option is enabled. So instead of directly checking dif
and sdif in inet[6]_match, here call inet_sk_bound_dev_eq(). This
allows a match on unbound socket for non-zero sdif i.e. for packets in
a VRF, if tcp_l3mdev_accept is enabled.
Fixes: 3c82a21f4320 ("net: allow binding socket in a VRF when there's an unbound socket")
Signed-off-by: Mike Manning <mvrmanning@gmail.com>
Link: https://lore.kernel.org/netdev/a54c149aed38fded2d3b5fdb1a6c89e36a083b74.camel@lasnet.de/
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-07-29 11:58:54 +01:00
..
2022-01-10 10:00:09 +09:00
2022-07-26 13:35:24 -07:00
2021-07-01 13:19:48 -07:00
2021-11-19 11:52:25 +00:00
2022-07-09 16:25:09 +02:00
2022-05-16 10:10:37 +01:00
2021-11-17 20:17:05 -08:00
2019-06-05 17:37:07 +02:00
2022-04-12 15:00:25 +02:00
2022-05-12 16:15:30 -07:00
2020-02-28 14:51:30 +01:00
2022-04-08 13:45:43 +01:00
2022-07-28 10:42:44 -07:00
2019-05-30 11:26:41 -07:00
2021-04-23 10:17:26 +01:00
2021-11-26 18:01:58 -08:00
2022-03-11 23:14:19 -08:00
2022-07-19 12:37:02 +02:00
2022-02-21 11:44:30 +00:00
2022-07-28 22:06:15 -07:00
2021-08-03 13:05:25 +01:00
2021-12-13 12:34:09 +00:00
2022-02-15 14:35:18 +00:00
2021-12-03 14:16:48 +00:00
2022-02-21 12:13:45 +00:00
2022-06-01 11:18:55 +02:00
2021-03-26 17:43:55 +01:00
2021-12-03 14:15:49 +00:00
2019-05-21 11:28:45 +02:00
2019-06-19 17:09:55 +02:00
2022-06-29 11:43:15 +02:00
2022-05-22 21:51:54 +01:00
2022-03-11 10:57:22 +00:00
2020-07-15 07:45:24 -07:00
2020-03-27 19:40:38 -07:00
2021-12-22 15:03:47 -08:00
2021-12-22 15:03:51 -08:00
2021-12-22 15:03:51 -08:00
2021-08-05 11:46:42 +01:00
2021-10-13 09:40:46 -07:00
2019-05-30 11:29:52 -07:00
2019-05-30 11:29:52 -07:00
2022-05-05 15:47:23 -07:00
2021-07-30 15:33:24 +02:00
2019-05-21 11:52:39 +02:00
2019-05-21 11:52:39 +02:00
2021-10-13 09:40:46 -07:00
2022-05-12 16:38:55 -07:00
2019-12-16 16:09:44 -08:00
2021-11-29 19:50:45 -08:00
2022-02-09 11:41:47 +00:00
2020-05-08 21:33:33 -07:00
2021-12-06 16:05:10 -08:00
2020-05-05 13:23:29 -07:00
2022-04-13 10:16:11 +02:00
2020-04-20 07:34:16 +02:00
2019-06-19 17:09:55 +02:00
2021-12-06 16:06:02 -08:00
2019-12-24 22:37:30 -08:00
2021-12-16 07:18:35 -08:00
2022-04-20 11:09:13 +01:00
2022-07-06 12:44:39 +01:00
2022-03-15 20:20:02 -07:00
2021-01-21 13:33:45 +01:00
2021-01-21 13:33:45 +01:00
2019-12-09 10:36:44 -08:00
2021-10-18 12:54:41 +01:00
2021-02-12 16:31:46 -08:00
2019-03-22 12:09:31 -07:00
2021-01-29 20:39:14 -08:00
2022-02-18 11:00:25 +00:00
2022-03-11 08:28:27 -08:00
2020-06-22 21:12:44 -07:00
2019-10-25 16:24:32 -07:00
2021-06-28 14:29:45 -07:00
2022-02-04 16:25:21 +01:00
2019-05-30 11:26:41 -07:00
2022-04-06 22:09:39 -07:00
2019-04-22 21:50:53 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2022-07-29 11:58:54 +01:00
2021-01-27 18:18:15 -08:00
2022-07-22 15:09:10 -07:00
2022-02-07 20:12:45 -08:00
2021-10-15 11:33:08 +01:00
2022-03-03 14:38:48 +00:00
2022-07-29 11:58:54 +01:00
2022-07-29 11:58:54 +01:00
2022-05-13 12:24:12 +01:00
2019-02-08 21:50:15 -08:00
2022-02-17 07:00:39 -06:00
2021-11-16 13:16:54 +00:00
2022-02-17 11:44:20 -08:00
2021-11-19 20:09:55 -08:00
2022-04-25 11:40:45 +01:00
2022-04-11 17:37:50 -07:00
2022-04-25 11:40:45 +01:00
2021-10-07 19:52:58 +02:00
2022-07-20 10:14:49 +01:00
2022-02-04 14:15:11 -08:00
2021-11-22 15:44:49 +00:00
2022-06-08 10:56:43 -07:00
2019-06-19 17:09:55 +02:00
2020-06-20 17:22:22 -07:00
2021-03-23 14:14:50 -07:00
2021-12-07 20:44:59 -08:00
2021-10-13 09:40:46 -07:00
2021-07-27 13:05:56 +01:00
2021-11-07 19:25:29 +00:00
2021-08-30 01:51:36 +02:00
2022-06-29 11:43:15 +02:00
2022-04-25 20:51:12 +02:00
2021-06-24 12:41:12 -07:00
2022-04-01 12:04:15 +01:00
2021-10-29 13:23:51 +01:00
2020-03-02 11:16:27 -08:00
2021-03-26 15:14:56 -07:00
2020-02-28 12:08:37 -08:00
2020-05-29 21:20:20 -07:00
2022-05-23 16:07:14 -07:00
2019-12-09 10:36:44 -08:00
2022-03-03 11:55:12 -08:00
2022-02-02 20:30:18 -08:00
2022-05-11 12:43:10 +01:00
2022-02-10 15:30:26 +00:00
2021-12-10 06:38:26 -08:00
2019-05-21 11:28:45 +02:00
2021-07-27 11:43:50 +01:00
2019-11-12 08:18:03 -08:00
2019-04-11 13:59:49 -07:00
2021-09-24 14:07:10 +01:00
2021-11-16 18:02:46 +01:00
2022-04-15 10:43:47 +01:00
2020-03-04 13:25:55 -08:00
2022-04-12 15:00:25 +02:00
2022-04-08 13:45:43 +01:00
2022-01-27 13:53:27 +00:00
2022-07-15 18:50:35 -07:00
2021-08-09 15:34:21 -07:00
2022-07-13 12:56:49 +01:00
2021-03-25 17:40:43 -07:00
2020-07-31 09:24:23 +02:00
2022-02-02 14:45:18 +00:00
2021-10-13 09:40:45 -07:00
2022-07-15 11:49:55 +01:00
2020-06-23 20:27:09 -07:00
2022-04-13 12:46:26 +01:00
2019-04-22 21:47:25 -07:00
2022-05-31 20:39:28 -07:00
2020-07-13 11:03:44 -07:00
2022-05-04 19:22:20 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2022-01-04 12:17:35 +00:00
2021-04-28 14:06:45 -07:00
2020-09-28 15:19:03 -07:00
2019-10-05 16:29:00 -07:00
2021-06-15 18:01:05 +02:00
2022-07-25 12:42:09 +01:00
2021-08-03 13:05:26 +01:00
2022-04-08 11:49:08 +01:00
2022-03-17 16:49:58 -07:00
2019-05-30 11:26:32 -07:00
2022-07-22 12:06:17 +01:00
2019-05-30 11:26:32 -07:00
2019-10-04 14:07:07 -07:00
2022-07-14 10:12:39 -07:00
2020-06-23 20:10:15 -07:00
2020-06-18 20:46:23 -07:00
2021-02-04 18:37:14 -08:00
2022-07-20 10:14:49 +01:00
2022-01-27 13:53:27 +00:00
2019-11-14 18:12:17 -08:00
2022-03-01 08:38:02 +00:00
2019-12-09 10:28:43 -08:00
2021-12-14 00:24:24 +01:00
2022-01-27 17:25:32 +01:00
2021-12-29 08:48:14 -08:00
2022-03-17 20:33:52 +01:00
2022-05-19 11:23:59 -07:00
2022-04-26 16:19:54 +02:00