Wladimir J. van der Laan
e3b474c548
Merge #20140 : Restore compatibility with old CSubNet serialization
...
886be97af5d4aba338b23a7b20b8560be8156231 Ignore incorrectly-serialized banlist.dat entries (Pieter Wuille)
883cea7dea3cedc9b45b6191f7d4e7be2d9a11ca Restore compatibility with old CSubNet serialization (Pieter Wuille)
Pull request description:
#19628 changed CSubNet for IPv4 netmasks, using the first 4 bytes of `netmask` rather than the last 4 to store the actual mask. Unfortunately, CSubNet objects are serialized on disk in banlist.dat, breaking compatibility with existing banlists (and bringing them into an inconsistent state where entries reported in `listbanned` cannot be removed).
Fix this by reverting to the old format (just for serialization). Also add a sanity check to the deserializer so that nonsensical banlist.dat entries are ignored (which would otherwise be possible if someone added IPv4 entries after #19628 but without this PR).
Reported by Greg Maxwell.
ACKs for top commit:
laanwj:
Code review ACK 886be97af5d4aba338b23a7b20b8560be8156231
vasild:
ACK 886be97af
Tree-SHA512: d3fb91e8ecd933406e527187974f22770374ee2e12a233e7870363f52ecda471fb0b7bae72420e8ff6b6b1594e3037a5115984c023dbadf38f86aeaffcd681e7
2020-10-15 11:44:36 +02:00
..
2020-10-05 04:55:01 -07:00
2020-05-20 08:27:07 -04:00
2020-10-12 17:18:47 -07:00
2020-09-28 12:27:08 -07:00
2020-08-21 12:48:46 +08:00
2020-09-26 17:57:26 -07:00
2020-04-30 18:02:04 +08:00
2020-10-08 14:11:16 -07:00
2020-10-12 17:18:47 -07:00
2020-10-12 12:14:53 -07:00
2020-10-09 21:14:47 +03:00
2020-10-15 10:22:35 +02:00
2020-10-12 17:18:47 -07:00
2020-10-14 11:41:15 -07:00
2020-08-20 17:55:06 +00:00
2020-10-15 10:22:35 +02:00
2020-10-07 09:31:12 +02:00
2020-10-15 10:22:35 +02:00
2020-10-01 00:33:38 +02:00
2020-07-06 03:52:37 +02:00
2020-06-22 12:12:22 +02:00
2020-07-03 20:43:55 -07:00
2020-08-12 09:22:07 +01:00
2020-10-09 16:42:49 +02:00
2020-10-12 15:35:08 -07:00
2020-07-03 20:43:55 -07:00
2020-08-28 16:50:57 +02:00
2020-08-28 16:50:57 +02:00
2020-10-01 17:33:56 +02:00
2020-09-30 20:43:05 +03:30
2020-09-22 22:32:25 +02:00
2020-09-22 22:32:25 +02:00
2020-05-28 09:55:39 +03:00
2020-05-28 09:55:39 +03:00
2020-07-30 13:57:54 -07:00
2020-05-26 17:27:15 -04:00
2020-06-21 06:41:55 -04:00
2020-05-20 07:30:29 -04:00
2020-08-27 20:07:27 -04:00
2020-10-12 17:18:47 -07:00
2020-09-29 10:20:05 +02:00
2020-09-29 09:59:51 +03:00
2020-09-29 09:59:52 +03:00
2020-04-03 16:29:26 +02:00
2020-04-16 13:33:09 -04:00
2020-05-04 19:53:58 +03:00
2020-07-01 14:44:28 -04:00
2020-07-01 14:44:28 -04:00
2020-08-20 17:55:06 +00:00
2020-04-16 13:33:09 -04:00
2020-10-15 10:55:44 +02:00
2020-09-04 10:25:44 +01:00
2020-04-08 14:45:27 +00:00
2020-07-08 14:26:14 +03:00
2020-09-01 09:26:28 +08:00
2020-05-20 07:30:29 -04:00
2020-06-16 15:15:46 -04:00
2020-10-12 02:06:32 -07:00
2020-10-12 02:06:32 -07:00
2020-05-21 06:53:39 -04:00
2020-05-13 16:20:13 -04:00
2020-06-27 11:49:28 -04:00
2020-04-16 13:33:09 -04:00
2020-04-16 13:33:09 -04:00
2020-10-02 13:37:23 +02:00
2020-08-27 14:33:00 -04:00
2020-08-18 18:03:57 +00:00
2020-06-07 17:03:49 +02:00
2020-05-28 09:54:24 +03:00
2020-10-15 20:12:29 +13:00
2020-10-14 11:18:12 -04:00
2020-05-12 18:03:39 +03:00
2020-10-01 22:24:08 +02:00
2020-10-14 11:18:12 -04:00
2020-10-14 11:18:12 -04:00
2020-04-05 01:01:13 +02:00
2020-04-05 10:46:24 +08:00
2020-10-15 10:22:35 +02:00
2020-04-16 13:33:09 -04:00
2020-07-30 13:57:54 -07:00
2020-06-15 08:08:19 -04:00
2020-09-04 09:46:44 -07:00
2020-10-12 12:14:53 -07:00
2020-10-12 12:14:53 -07:00
2020-10-15 07:59:19 +08:00
2020-10-12 12:14:11 -07:00
2020-10-03 15:38:19 +03:00
2020-10-14 18:36:59 +02:00
2020-10-15 11:44:36 +02:00
2020-10-15 11:44:36 +02:00
2020-08-24 21:50:59 +02:00
2020-05-11 00:20:57 +02:00
2020-06-27 11:49:28 -04:00
2020-05-05 04:45:59 +03:00
2020-07-01 18:03:12 -04:00
2020-07-01 18:02:38 -04:00
2020-04-30 18:02:03 +08:00
2020-10-09 16:42:50 +02:00
2020-10-09 16:42:50 +02:00
2020-06-24 16:32:19 -04:00
2020-06-24 16:32:19 -04:00
2020-10-12 17:17:56 -07:00
2020-10-12 17:17:56 -07:00
2020-08-10 21:30:42 +08:00
2020-04-30 09:19:14 -04:00
2020-04-16 13:33:09 -04:00
2020-09-22 17:08:08 +02:00
2020-06-21 06:02:59 -04:00
2020-06-21 06:02:59 -04:00
2020-10-09 10:32:19 +02:00
2020-09-22 22:31:31 +02:00
2020-09-22 22:31:31 +02:00
2020-07-30 13:57:09 -07:00
2020-10-09 16:42:49 +02:00
2020-08-29 20:46:47 +03:00
2020-09-19 18:02:42 +03:00
2020-08-18 10:46:53 +03:00
2020-10-12 19:50:16 -07:00
2020-10-11 08:51:57 +08:00
2020-10-01 19:00:07 +03:00
2020-07-29 07:53:19 +02:00
2020-07-01 14:44:24 -04:00
2020-09-22 11:34:30 -04:00
2020-09-22 11:34:30 -04:00
2020-10-12 12:14:53 -07:00
2020-10-12 12:14:53 -07:00
2020-10-12 11:01:16 -07:00
2020-10-12 11:01:16 -07:00
2020-04-16 13:33:09 -04:00
2020-10-15 10:22:35 +02:00
2020-10-05 04:55:01 -07:00
2020-09-22 11:34:30 -04:00
2020-09-22 11:34:30 -04:00
2020-09-17 22:17:17 +02:00
2020-10-12 17:18:47 -07:00
2020-07-29 16:36:44 +07:00
2020-06-10 15:01:20 +03:00
2020-06-10 15:01:20 +03:00