Hi,

On Thu, Jun 28, 2018 at 11:48:24AM +0200, [email protected] wrote:
> 
> Hi,
> 
> When applying hex transform to an IPv6 in unique-id-format, the result is an 
> string full of zeros. unique-id-format %{+X}o\ 
> %ci:%cp_%fi:%fp_%Ts_%rt:%pid"00000000:D142_00000000:01BB_5B348110_0000:0FC3"
> When hex transform is disabled, the IPv6 is printed.
> 
> Here is a patch that only applies hex transformation to IPv4 addresses.

Hmmm I get your point but then we should have 3 cases handled differently :
  - IPv4 => hex conversion
  - IPv6 => no conversion
  - IPv4 in IPv6 => conversion of the IPv4 part.

In practice it should still boil down to doing IPv4 vs IPv6 and encoding
the fields manually for IPv6 without the colons. Indeed, some people will
definitely expect the hexa conversion to put a 16-byte block at once and
not to insert colons that are used as port delimiters in their format,
especially for unique-id. So this should just have its own encoding format
for IPv6 addresses in my opinion.

Thanks,
willy

Reply via email to