]> git.proxmox.com Git - pve-common.git/commitdiff
read_etc_network_interfaces: improved parsing
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 25 Jun 2015 09:54:26 +0000 (11:54 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 26 Jun 2015 05:43:18 +0000 (07:43 +0200)
* parsing ipv6 blocks
* parsing extra lines like source/source-directory/...
* merge multiple bridge_port lines into one
* write options only once

The returned config hash is not just the interface hash
anymore. Interfaces are now in its 'ifaces' member hash. All
unknown options (including mappings) end up in its 'options'
hash.

Added a comment describing the config hash's layout in
detail.

An interface can now have an ipv4 and an ipv6 entry, they
will be returned as a single interface with
address/netmask/gateway and address6/netmask6/gateway6
elements. Additionally a 'families' array is available
listing which families are available. Ideally we'll at some
point allow unhandled families to be kept too, however, now
that extra lines like 'source' and 'source-directory' are
preserved, it is recommended to move all custom
configuration into separate files to not interfere with our
interface parsing.

Options such as bridge ports or ovs_* will now be written
out only for the first interface. If multiple protocol
families of a bridge contain bridge_ports lines they will be
merged into the first interface.


No differences found