|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 3/3] Report IP network prefix in XenStore
On 28/07/2026 16:31, Owen Smith wrote:
>
>> @@ -735,7 +761,7 @@ FrontendDumpIPv6Address(
>> _In_ PXENVIF_ADDRESS Entry
>> )
>> {
>> - CHAR Node[sizeof ("ipv6/XXXXXXXXXX")];
>> + CHAR Node[sizeof ("ipv6/XXXXXXXXXX/prefix")];
>> ULONG Index;
>> ULONG Count;
>> ULONG ZeroIndex;
>> @@ -823,6 +849,26 @@ FrontendDumpIPv6Address(
>> if (!NT_SUCCESS(status))
>> return status;
>>
>> + if (Entry->Prefix > 128)
>> + return STATUS_SUCCESS;
>> +
>> + status = RtlStringCbPrintfA(Node,
>> + sizeof (Node),
>> + "ipv6/%u/prefix",
>> + AddressIndex);
>> + if (!NT_SUCCESS(status))
>> + return status;
>> +
>> + status = XENBUS_STORE(Printf,
>> + &Frontend->StoreInterface,
>> + Transaction,
>> + __FrontendGetPrefix(Frontend),
>> + Node,
>> + "%hhu",
>> + Entry->Prefix);
>> + if (!NT_SUCCESS(status))
>> + return status;
>> +
>> return STATUS_SUCCESS;
>> }
>
> Is it intentional to potentially leave a 'prefix' value if Prefix <= 128?
> Should "ipv6/%u/prefix" value be removed if Entry->Prefix <= 128
StoreRemove is called on the entire ipv4/ipv6 key before writing to
xenstore:
https://github.com/xcp-ng/win-xenvif/blob/1982ec64f82bc157e6bf15dd19f9106ef01a59bd/src/xenvif/frontend.c#L800
So removing the prefix value shouldn't be needed in this case.
>
> Owen
--
Ngoc Tu Dinh | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |