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 @@ -96,7 +96,7 @@ namespace {
96
96
97
97
static TRawIp6 MaskFromPrefix (ui8 prefix) {
98
98
ui128 x = ui128 (-1 ) << int (128 - prefix);
99
- if (prefix == 0 ) x = ui128 (- 1 ) ;
99
+ if (prefix == 0 ) x = 0 ;
100
100
return FromIpAddress ({x, TIpv6Address::Ipv6});
101
101
}
102
102
@@ -188,7 +188,7 @@ namespace {
188
188
memcpy (&subnet4, str.Data (), sizeof subnet4);
189
189
range = subnet4.ToIpRange ();
190
190
} else if (str.Size () == sizeof (TRawIp6Subnet)) {
191
- TRawIp4Subnet subnet6;
191
+ TRawIp6Subnet subnet6;
192
192
memcpy (&subnet6, str.Data (), sizeof subnet6);
193
193
range = subnet6.ToIpRange ();
194
194
} else {
@@ -247,7 +247,7 @@ namespace {
247
247
SIMPLE_UDF (TSubnetToString, char *(TAutoMapString)) {
248
248
TStringBuilder result;
249
249
auto range = DeserializeSubnet (args[0 ].AsStringRef ());
250
- result << (*range.Begin ()).ToString ();
250
+ result << (*range.Begin ()).ToString (false );
251
251
result << ' /' ;
252
252
result << ToString (GetAddressRangePrefix (range));
253
253
return valueBuilder->NewString (result);
You can’t perform that action at this time.
0 commit comments