]> git.proxmox.com Git - pve-common.git/commit - src/PVE/INotify.pm
INotify: map address/netmask to cidr while parsing interfaces
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 3 May 2019 07:28:51 +0000 (09:28 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 8 May 2019 14:49:45 +0000 (14:49 +0000)
commit2896245e759b72c136785f22d6d0edaa23248b32
tree3c6efc65a92707762884f6a4b41f81ed21e5fdf2
parentaad3582eab367a261d5a2a1fed9002fe299f9d46
INotify: map address/netmask to cidr while parsing interfaces

this allows us to always show the 'address' the 'netmask' and the 'cidr'
both for ipv4 and ipv6

there is a small api change involved in one scenario:
if one manually changed the address to cidr format like
    '10.0.0.4/24'

we now get from the api the parsed values
    addr => 10.0.0.4
    netmask => 24
    cidr => 10.0.0.4/24

instead of
    addr => 10.0.0.4/24
    netmask =>

but i think that circumventing our api when writing the file, but still
relying on the api for reading is not a valid use case, i would argue
that we can change this, especially since we have a new field that
contains that information again (cidr)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/PVE/INotify.pm