As for libxl driver, libvirt pops up unsupported error when using tftp.
For qemu driver, tftp is dropped since v2.8. Besides, tftp is completely
unusable before v2.8 [1]. So let's remove all the tftp support.
[1]:
https://bugzilla.redhat.com/show_bug.cgi?id=1372143#c2
Signed-off-by: Han Han <hhan(a)redhat.com>
---
src/libxl/libxl_conf.c | 1 -
src/libxl/xen_xl.c | 1 -
src/qemu/qemu_block.c | 3 ---
src/qemu/qemu_command.c | 1 -
src/qemu/qemu_domain.c | 11 -----------
src/qemu/qemu_driver.c | 3 ---
src/util/virstoragefile.c | 6 ------
src/util/virstoragefile.h | 1 -
8 files changed, 27 deletions(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index a0059fc2..cc80c063 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -920,7 +920,6 @@ libxlMakeNetworkDiskSrcStr(virStorageSourcePtr src,
case VIR_STORAGE_NET_PROTOCOL_HTTPS:
case VIR_STORAGE_NET_PROTOCOL_FTP:
case VIR_STORAGE_NET_PROTOCOL_FTPS:
- case VIR_STORAGE_NET_PROTOCOL_TFTP:
case VIR_STORAGE_NET_PROTOCOL_ISCSI:
case VIR_STORAGE_NET_PROTOCOL_GLUSTER:
case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG:
diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c
index d40c2e1d..38412038 100644
--- a/src/libxl/xen_xl.c
+++ b/src/libxl/xen_xl.c
@@ -1572,7 +1572,6 @@ xenFormatXLDiskSrcNet(virStorageSourcePtr src)
case VIR_STORAGE_NET_PROTOCOL_HTTPS:
case VIR_STORAGE_NET_PROTOCOL_FTP:
case VIR_STORAGE_NET_PROTOCOL_FTPS:
- case VIR_STORAGE_NET_PROTOCOL_TFTP:
case VIR_STORAGE_NET_PROTOCOL_ISCSI:
case VIR_STORAGE_NET_PROTOCOL_GLUSTER:
case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG:
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 6f9c7071..a5c06e60 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -1137,7 +1137,6 @@ qemuBlockStorageSourceGetBackendProps(virStorageSourcePtr src,
case VIR_STORAGE_NET_PROTOCOL_HTTPS:
case VIR_STORAGE_NET_PROTOCOL_FTP:
case VIR_STORAGE_NET_PROTOCOL_FTPS:
- case VIR_STORAGE_NET_PROTOCOL_TFTP:
driver = virStorageNetProtocolTypeToString(src->protocol);
if (!(fileprops = qemuBlockStorageSourceGetCURLProps(src, onlytarget)))
return NULL;
@@ -2076,7 +2075,6 @@ qemuBlockGetBackingStoreString(virStorageSourcePtr src,
case VIR_STORAGE_NET_PROTOCOL_HTTPS:
case VIR_STORAGE_NET_PROTOCOL_FTP:
case VIR_STORAGE_NET_PROTOCOL_FTPS:
- case VIR_STORAGE_NET_PROTOCOL_TFTP:
case VIR_STORAGE_NET_PROTOCOL_ISCSI:
case VIR_STORAGE_NET_PROTOCOL_GLUSTER:
if (!(uri = qemuBlockStorageSourceGetURI(src)))
@@ -2480,7 +2478,6 @@ qemuBlockStorageSourceCreateGetStorageProps(virStorageSourcePtr
src,
case VIR_STORAGE_NET_PROTOCOL_HTTPS:
case VIR_STORAGE_NET_PROTOCOL_FTP:
case VIR_STORAGE_NET_PROTOCOL_FTPS:
- case VIR_STORAGE_NET_PROTOCOL_TFTP:
case VIR_STORAGE_NET_PROTOCOL_NONE:
case VIR_STORAGE_NET_PROTOCOL_LAST:
return 0;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 419eca56..3c4b1fa6 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -966,7 +966,6 @@ qemuBuildNetworkDriveStr(virStorageSourcePtr src,
case VIR_STORAGE_NET_PROTOCOL_HTTPS:
case VIR_STORAGE_NET_PROTOCOL_FTP:
case VIR_STORAGE_NET_PROTOCOL_FTPS:
- case VIR_STORAGE_NET_PROTOCOL_TFTP:
case VIR_STORAGE_NET_PROTOCOL_ISCSI:
case VIR_STORAGE_NET_PROTOCOL_GLUSTER:
ret = qemuBuildNetworkDriveURI(src, secinfo);
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index d5e3d1a3..02306c9e 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -5319,16 +5319,6 @@ qemuDomainValidateStorageSource(virStorageSourcePtr src,
return -1;
}
- /* TFTP protocol was not supported for some time, lock it out at least with
- * -blockdev */
- if (actualType == VIR_STORAGE_TYPE_NETWORK &&
- src->protocol == VIR_STORAGE_NET_PROTOCOL_TFTP &&
- blockdev) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("'tftp' protocol is not supported with this QEMU
binary"));
- return -1;
- }
-
return 0;
}
@@ -10694,7 +10684,6 @@ qemuDomainPrepareStorageSourceTLS(virStorageSourcePtr src,
case VIR_STORAGE_NET_PROTOCOL_HTTPS:
case VIR_STORAGE_NET_PROTOCOL_FTP:
case VIR_STORAGE_NET_PROTOCOL_FTPS:
- case VIR_STORAGE_NET_PROTOCOL_TFTP:
case VIR_STORAGE_NET_PROTOCOL_SSH:
if (src->haveTLS == VIR_TRISTATE_BOOL_YES) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index dd9ae30b..b8850bd0 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14556,7 +14556,6 @@
qemuDomainSnapshotPrepareDiskExternalInactive(virDomainSnapshotDiskDefPtr snapdi
case VIR_STORAGE_NET_PROTOCOL_HTTPS:
case VIR_STORAGE_NET_PROTOCOL_FTP:
case VIR_STORAGE_NET_PROTOCOL_FTPS:
- case VIR_STORAGE_NET_PROTOCOL_TFTP:
case VIR_STORAGE_NET_PROTOCOL_SSH:
case VIR_STORAGE_NET_PROTOCOL_VXHS:
case VIR_STORAGE_NET_PROTOCOL_LAST:
@@ -14644,7 +14643,6 @@ qemuDomainSnapshotPrepareDiskExternalActive(virDomainObjPtr vm,
case VIR_STORAGE_NET_PROTOCOL_HTTPS:
case VIR_STORAGE_NET_PROTOCOL_FTP:
case VIR_STORAGE_NET_PROTOCOL_FTPS:
- case VIR_STORAGE_NET_PROTOCOL_TFTP:
case VIR_STORAGE_NET_PROTOCOL_SSH:
case VIR_STORAGE_NET_PROTOCOL_VXHS:
case VIR_STORAGE_NET_PROTOCOL_LAST:
@@ -14774,7 +14772,6 @@ qemuDomainSnapshotPrepareDiskInternal(virDomainDiskDefPtr disk,
case VIR_STORAGE_NET_PROTOCOL_HTTPS:
case VIR_STORAGE_NET_PROTOCOL_FTP:
case VIR_STORAGE_NET_PROTOCOL_FTPS:
- case VIR_STORAGE_NET_PROTOCOL_TFTP:
case VIR_STORAGE_NET_PROTOCOL_SSH:
case VIR_STORAGE_NET_PROTOCOL_VXHS:
case VIR_STORAGE_NET_PROTOCOL_LAST:
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 535a94e2..e5e3c9f1 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -87,7 +87,6 @@ VIR_ENUM_IMPL(virStorageNetProtocol,
"https",
"ftp",
"ftps",
- "tftp",
"ssh",
"vxhs",
);
@@ -3159,7 +3158,6 @@ virStorageSourceParseBackingColon(virStorageSourcePtr src,
case VIR_STORAGE_NET_PROTOCOL_HTTPS:
case VIR_STORAGE_NET_PROTOCOL_FTP:
case VIR_STORAGE_NET_PROTOCOL_FTPS:
- case VIR_STORAGE_NET_PROTOCOL_TFTP:
case VIR_STORAGE_NET_PROTOCOL_ISCSI:
case VIR_STORAGE_NET_PROTOCOL_GLUSTER:
case VIR_STORAGE_NET_PROTOCOL_SSH:
@@ -3868,7 +3866,6 @@ static const struct virStorageSourceJSONDriverParser jsonParsers[] =
{
{"https", false, virStorageSourceParseBackingJSONUri,
VIR_STORAGE_NET_PROTOCOL_HTTPS},
{"ftp", false, virStorageSourceParseBackingJSONUri,
VIR_STORAGE_NET_PROTOCOL_FTP},
{"ftps", false, virStorageSourceParseBackingJSONUri,
VIR_STORAGE_NET_PROTOCOL_FTPS},
- {"tftp", false, virStorageSourceParseBackingJSONUri,
VIR_STORAGE_NET_PROTOCOL_TFTP},
{"gluster", false, virStorageSourceParseBackingJSONGluster, 0},
{"iscsi", false, virStorageSourceParseBackingJSONiSCSI, 0},
{"nbd", false, virStorageSourceParseBackingJSONNbd, 0},
@@ -4637,9 +4634,6 @@ virStorageSourceNetworkDefaultPort(virStorageNetProtocol protocol)
case VIR_STORAGE_NET_PROTOCOL_FTPS:
return 990;
- case VIR_STORAGE_NET_PROTOCOL_TFTP:
- return 69;
-
case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG:
return 7000;
diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h
index c68bdc96..2c94fc44 100644
--- a/src/util/virstoragefile.h
+++ b/src/util/virstoragefile.h
@@ -132,7 +132,6 @@ typedef enum {
VIR_STORAGE_NET_PROTOCOL_HTTPS,
VIR_STORAGE_NET_PROTOCOL_FTP,
VIR_STORAGE_NET_PROTOCOL_FTPS,
- VIR_STORAGE_NET_PROTOCOL_TFTP,
VIR_STORAGE_NET_PROTOCOL_SSH,
VIR_STORAGE_NET_PROTOCOL_VXHS,
--
2.25.0