From 9dbc120bbcb350da6b16952625f87bdf4d5dcad6 Mon Sep 17 00:00:00 2001 From: spiral Date: Mon, 29 Nov 2021 21:35:56 -0500 Subject: [PATCH] fix: private IP checker wasn't working correctly for some reason --- PluralKit.Core/Dispatch/DispatchModels.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PluralKit.Core/Dispatch/DispatchModels.cs b/PluralKit.Core/Dispatch/DispatchModels.cs index a2d3ecae..220fc01b 100644 --- a/PluralKit.Core/Dispatch/DispatchModels.cs +++ b/PluralKit.Core/Dispatch/DispatchModels.cs @@ -79,12 +79,14 @@ public static class DispatchExt { if ((address.Address & 0x7f000000) == 0x7f000000) // 127.0/8 return false; - if ((address.Address & 0x0a000000) == 0x0a000000) // 10.0/8 + if ((address.Address & 0xa000000) == 0xa000000) // 10.0/8 return false; if ((address.Address & 0xa9fe0000) == 0xa9fe0000) // 169.254/16 return false; if ((address.Address & 0xac100000) == 0xac100000) // 172.16/12 return false; + if ((address.Address & 0xc0a80000) == 0xc0a80000) // 192.168/16 + return false; } if (host.AddressList.Any(address => address.IsIPv6LinkLocal))