--- Begin Message --- In some cases, users may want to use the "DOCUMENTION" address as the internal address of NAT66.

Shouldn't a check be added here to allow the configuration of document address?

If ULA is used, systems such as Windows and Android will not prioritize IPv6, so some users use addresses intended for documentation purposes to bypass this restriction.


https://git.proxmox.com/?p=pve-manager.git;a=blob;f=PVE/API2/Network.pm;h=fc053fec7a8bae6dc30d2bb2870a2a94d3420231;hb=HEAD#l588

my $check_ipv6_settings = sub {
    my ($address, $netmask) = @_;

    raise_param_exc({ netmask => "$netmask is not a valid subnet length for ipv6" })
        if $netmask < 0 || $netmask > 128;

    raise_param_exc({ address => "$address is not a valid host IPv6 address." })
        if !Net::IP::ip_is_ipv6($address);

    my $binip = ipv6_tobin($address);
    my $binmask = Net::IP::ip_get_mask($netmask, 6);

    my $type = ($binip eq $binmask) ? 'ANYCAST' : Net::IP::ip_iptypev6($binip);

    if (defined($type) && $type !~ /^(?:(?:GLOBAL|(?:UNIQUE|LINK)-LOCAL)-UNICAST)$/) {
        raise_param_exc(
            { address => "$address with type '$type', cannot be used as host IPv6 address." });
    }
};





--- End Message ---
_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to