Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.65k stars 406 forks source link

Support IPv6 in automation #4622

Open bmfmancini opened 2 years ago

bmfmancini commented 2 years ago

Hello All,

Currently automation does not support IPv6 as the move from ipv4 to ipv6 occurs this will be a crucial feature for autom8

bmfmancini commented 2 years ago

Looks like its a matter of updating the regex here

function automation_get_next_host($start, $total, $count, $range) {
    if ($count == $total || $total < 1) {
        return false;
    }

    if (preg_match('/^([0-9]{1,3}\.[0-9]{1,3}\.)\*(\.[0-9]{1,3})$/', $range, $matches)) {
        // 10.1.*.1
        return $matches[1] . ++$count . $matches[2];

to include a or statment to match for an IPv6 match

I found one here

https://community.helpsystems.com/forums/intermapper/miscellaneous-topics/5acc4fcf-fa83-e511-80cf-0050568460e4?_ga=2.113564423.1432958022.1523882681-2146416484.1523557976

TheWitness commented 2 years ago

It's a much larger change I think.

stefanbrudny commented 2 years ago

I'd be also remotely interested in this, seeing lots of IPv6 only cpe devices out there.

bmfmancini commented 2 years ago

Yeah and it will pickup more and more Good thing is the snmp functionality works as is

On Sun., Jul. 24, 2022, 5:01 p.m. stefanbrudny, @.***> wrote:

I'd be also remotely interested in this, seeing lots of IPv6 only cpe devices out there.

— Reply to this email directly, view it on GitHub https://github.com/Cacti/cacti/issues/4622#issuecomment-1193393571, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGEXTAI5AESRMB3G2U7SVTVVWVL7ANCNFSM5QYXMKMQ . You are receiving this because you authored the thread.Message ID: @.***>