Commit graph

29 commits

Author SHA1 Message Date
Jing Luo via pve-devel f79f21a1bc d/control: break the circular build-dependency with pve-firewall, and more
Currently pve-network has a (versioned) build-dep of pve-firewall, which has
a (versioned) runtime dependency of a newer version of libpve-network-perl,
which is not available because it has not been built. It turns out that
pve-firewall is only needed in testing, so let's only pull it in if
we don't use the "nocheck" build profile so that we can actually build
pve-network from source.

perl is a build-essential so no need to add it in build-deps.

Fixes: cbc70c81b9
Signed-off-by: Jing Luo <jing@jing.rocks>
Link: https://lore.proxmox.com/mailman.599.1732342430.391.pve-devel@lists.proxmox.com
2025-04-07 12:47:23 +02:00
Hannes Duerr 894d2d33e3 api request helper: enforce TLS cert-check and add cert-fingerprint option
Currently, we do not verify the TLS certificate for API requests
external IPAM and DNS integration. This could allow man-in-the-middle
attacks, albeit most IPAM infrastructure is on controlled and isolated
LANs, so it's not something that should frequently happen; and
technically our IPAM integration is still marked as tech-preview,
which had its reasons.

Enforce verification, and allow users to pass a cert SHA256
fingerprint to ensure a certificates validity if it's not trusted by
the system trust store, as it's, e.g., the case for self-signed certs.

The code was adapted from the one in pve-apiclient, which we cannot
reuse directly as it is only implemented for requests against PVE
nodes, not as a generic HTTP client request helper.

Add the new dependency `libio-socket-ssl-perl` required to get the
verify callback for the TLS certificate used for cert-fingerprint
checking.

Signed-off-by: Hannes Duerr <h.duerr@proxmox.com>
Tested-by: Stefan Hanreich <s.hanreich@proxmox.com>
 [TL: return valid for non-leaf certs and rewrite commit message]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-03-06 10:00:21 +01:00
Thomas Lamprecht cbc70c81b9 d/control: record dependency to pve-firewall from api package
We mount the per-vnet firewall API endpoints here now, as we split api
and implementation we can avoid a cyclic dependency.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-19 16:41:33 +01:00
Thomas Lamprecht acd6a2a1b1 d/control: bump versioned dependency for pve-cluster
To ensure 'sdn/mac-cache.json' is available as observed file.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-18 22:21:20 +01:00
Thomas Lamprecht 98f4d7525c split into implementation and API endpoint packages
To better handle the case where firewall requires to parse the SDN
config and this package here would like to mount some vnet specific
firewall endpoints, without a split we got a cyclic dependency here,
and those are painful, especially on bootstrapping.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-18 18:17:20 +01:00
Thomas Lamprecht 026dab2090 d/control: bump versioned dependency for pve-cluster
to ensure 'sdn/pve-ipam-state.json' is in the list of observed files
for version tracking and direct IPC get-config availability through
pmxcfs.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-18 16:49:46 +01:00
Stefan Lendl 0f6bc593aa debian: blackbox tests depend on libpve-access-control at build
For mocking RPCEnvironment in sbuild.

Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
Reviewed-by: Stefan Hanreich <s.hanreich@proxmox.com>
Tested-by: Stefan Hanreich <s.hanreich@proxmox.com>
2024-04-08 17:57:18 +02:00
Thomas Lamprecht 365a4072e4 d/control: downgrade frr-pythontools from recommends to suggests
avoid pulling FRR in on upgrade if we'd hard-depend on
libpve-network-perl for all those systems that kept the default
install-recommends enabled as FRR is a bit involved and might announce
stuff and break some network environments if not correctly configured.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-21 08:26:59 +01:00
Thomas Lamprecht 46348e8ba6 d/control: drop explicit perl dependency
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-21 08:26:36 +01:00
Thomas Lamprecht 8baff6bc3a d/control: update versioned dependency for pve-cluster
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-20 17:41:33 +01:00
Stefan Hanreich 33074dfbee sdn: dhcp: add dnsmasq plugin
The plugin creates a dnsmasq@<zone> service that spawns a dnsmasq
instance that handles dhcp for that zone.

The configuration files for a dnsmasq instance lie within
/etc/dnsmasq.d/<zone>

The plugin generates the following configuration files:
* 00-default.conf
  Contains the default global configuration for dnsmasq. Disables DNS,
  enables some specific options for Windows, does some
  security-related configuration and makes dnsmasq bind only to the
  interfaces it is responsible for
* 10-<subnet>.conf
  Contains the default settings for a subnet. Sets dhcp options for
  DNS and gateway.
* 10-<subnet>.ranges.conf
  Contains the configuration of DHCP ranges for a subnet.
* ethers
  Contains the MAC address to IP mappings for a zone.

Every subnet gets assigned a tag in the dnsmasq configuration that is
equal to the subnet_id. This can be used to override / set additional
configuration options on a per-subnet basis.

Additionally it creates the file /etc/default/dnsmasq.<zone> that
provides default options for the dnsmasq service.

Leases are stored in /var/lib/misc/dnsmasq.<zone>.

Co-Authored-By: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-11-18 15:59:50 +01:00
Thomas Lamprecht 13c75e8619 d/control: update dependencies
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-06 10:23:57 +02:00
Thomas Lamprecht 11f3cfd9a1 d/control: raise compat level to 13
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-25 18:18:57 +02:00
Thomas Lamprecht cead0f28af d/control: reword package description slightly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-25 18:18:57 +02:00
Thomas Lamprecht a4f5a945b7 d/control: drop outdated breaks for pve-manager << 5.2-12
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-25 18:18:57 +02:00
Thomas Lamprecht 517b531b88 d/control: raise standards version compliance to 4.6.2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-25 18:18:57 +02:00
Thomas Lamprecht 94b92a83d4 d/control: record missing libtest-mockmodule-perl build-dependency
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-25 18:18:57 +02:00
Fabian Grünbichler 9fad492e42 d/control: add missing build dependency
the File::Slurp module is used for test cases..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-20 10:12:17 +01:00
Thomas Lamprecht 90c150b25b d/control: fix description
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-05 07:20:14 +02:00
Thomas Lamprecht 7eeb790f72 d/control: bump versioned dependency for pve-cluster
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-26 16:11:36 +02:00
Thomas Lamprecht dd510e8a11 d/control: record libnet-subnet-perl build dependency
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-06 14:56:34 +01:00
Thomas Lamprecht ef7eab8ff8 bump versioned dependency to pve-cluster to 6.2-2
for new registered .configs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-08 11:05:28 +02:00
Alexandre Derumier 70b0350642 add IPAMs plugins
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-06 18:11:17 +02:00
Alexandre Derumier c33dd81818 add subnet plugin
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-06 17:30:01 +02:00
Thomas Lamprecht 74515f4295 d/control: recommend frr-pythontools, ifupdown2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-06 12:29:28 +02:00
Thomas Lamprecht 564fe87dd4 d/compat: bump level to 11 and fix lintian warnings
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-10 17:53:17 +02:00
Thomas Lamprecht 9925d85b1b d/control: depend on defined ${perl:Depends}
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-12 07:04:16 +02:00
Thomas Lamprecht 9f6f58f0ed d/control: fix priority-extra-is-replaced-by-priority-optional
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-04 06:38:11 +02:00
Alexandre Derumier 0399edbbbd initial package commit
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-03-28 10:59:08 +01:00