mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
net_util: add support for IPv6 addresses on tap interfaces
Allow tap interfaces to be configured with an IPv6 address. The change is fairly straightforward: we need to update the API types and CLI parsing to accept either an IPv6 or IPv4 and then match on the IP address type when the tap device is configured. For IPv6 addresses, the netmask (prefix) must be provided at the same time as the address itself (in the SIOCSIFADDR ioctl). They cannot be configured separately. So we remove the separate "set_netmask" function and convert "set_ip_addr" to also accept a netmask. For IPv4 addresses, the IP address and netmask were already always set together, so this should have no functional impact for users of IPv4 addresses. Signed-off-by: Gregory Anders <ganders@cloudflare.com>
This commit is contained in:
committed by
Rob Bradford
parent
1454d39b28
commit
dce82a34d0
@@ -935,9 +935,11 @@ components:
|
||||
ip:
|
||||
type: string
|
||||
default: "192.168.249.1"
|
||||
description: IPv4 or IPv6 address
|
||||
mask:
|
||||
type: string
|
||||
default: "255.255.255.0"
|
||||
description: Must be a valid IPv4 netmask if ip is an IPv4 address or a valid IPv6 netmask if ip is an IPv6 address.
|
||||
mac:
|
||||
type: string
|
||||
host_mac:
|
||||
|
||||
Reference in New Issue
Block a user