File tree 1 file changed +3
-3
lines changed
ydb/library/yql/udfs/common/ip_base/lib
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ namespace {
95
95
96
96
static TRawIp6 MaskFromPrefix (ui8 prefix) {
97
97
ui128 x = ui128 (-1 ) << int (128 - prefix);
98
- if (prefix == 0 ) x = ui128 (- 1 ) ;
98
+ if (prefix == 0 ) x = 0 ;
99
99
return FromIpAddress ({x, TIpv6Address::Ipv6});
100
100
}
101
101
@@ -187,7 +187,7 @@ namespace {
187
187
memcpy (&subnet4, str.Data (), sizeof subnet4);
188
188
range = subnet4.ToIpRange ();
189
189
} else if (str.Size () == sizeof (TRawIp6Subnet)) {
190
- TRawIp4Subnet subnet6;
190
+ TRawIp6Subnet subnet6;
191
191
memcpy (&subnet6, str.Data (), sizeof subnet6);
192
192
range = subnet6.ToIpRange ();
193
193
} else {
@@ -245,7 +245,7 @@ namespace {
245
245
SIMPLE_UDF (TSubnetToString, char *(TAutoMapString)) {
246
246
TStringBuilder result;
247
247
auto range = DeserializeSubnet (args[0 ].AsStringRef ());
248
- result << (*range.Begin ()).ToString ();
248
+ result << (*range.Begin ()).ToString (false );
249
249
result << ' /' ;
250
250
result << ToString (GetAddressRangePrefix (range));
251
251
return valueBuilder->NewString (result);
You can’t perform that action at this time.
0 commit comments