diff --git a/clibcni-sw.patch b/clibcni-sw.patch new file mode 100644 index 0000000000000000000000000000000000000000..7f2a18eb0aca352f34d0e517d48620d90195ab6a --- /dev/null +++ b/clibcni-sw.patch @@ -0,0 +1,37 @@ +diff -Nuar clibcni.org/clibcni.spec clibcni.sw/clibcni.spec +--- clibcni.org/clibcni.spec 2022-03-02 01:44:25.470000000 +0000 ++++ clibcni.sw/clibcni.spec 2022-03-02 01:46:02.760000000 +0000 +@@ -16,7 +16,7 @@ + + Requires: lcr + +-%ifarch x86_64 aarch64 ++%ifarch x86_64 aarch64 sw_64 + Provides: lib%{name}.so()(64bit) + %endif + +@@ -31,7 +31,7 @@ + %package devel + Summary: Huawei CNI C Library + Group: Libraries +-ExclusiveArch: x86_64 aarch64 ++ExclusiveArch: x86_64 aarch64 sw_64 + Requires: %{name} = %{version}-%{release} + + %description devel +diff -Naru clibcni-v2.0.7/src/types/types.c clibcni-v2.0.7-sw/src/types/types.c +--- clibcni-v2.0.7/src/types/types.c 2022-02-22 03:14:20.000000000 +0000 ++++ clibcni-v2.0.7-sw/src/types/types.c 2022-09-06 07:56:08.299532884 +0000 +@@ -453,6 +453,12 @@ + (void)memcpy(*mask, (value->ip_mask + IPV4_TO_V6_EMPTY_PREFIX_BYTES), IPV4LEN); + return IPV4LEN; + } else { ++ *mask = clibcni_util_smart_calloc_s(IPV6LEN, sizeof(uint8_t)); ++ if (*mask == NULL) { ++ *err = clibcni_util_strdup_s("Out of memory"); ++ ERROR("Out of memory"); ++ return 0; ++ } + (void)memcpy(*mask, value->ip_mask, IPV6LEN); + return IPV6LEN; + } diff --git a/clibcni.spec b/clibcni.spec index 37c0d53c5e2a88dbb3589f4fc0ecb7de55b55741..a494603e60b4ddea73fd1e375953855e3574a141 100644 --- a/clibcni.spec +++ b/clibcni.spec @@ -1,5 +1,5 @@ %global _version 2.0.7 -%global _release 4 +%global _release 5 Name: clibcni Version: %{_version} Release: %{_release} @@ -12,6 +12,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version} %define lcrver_lower 2.0.8-0 %define lcrver_upper 2.0.9-0 +%ifarch sw_64 +Patch01: clibcni-sw.patch +%endif BuildRequires: gcc git gcc-c++ BuildRequires: cmake @@ -88,6 +91,9 @@ rm -rf %{buildroot} %{_libdir}/pkgconfig/%{name}.pc %changelog +* Fri Dec 9 zhangzhixin - 2.0.7-5 +- Add Sw64 64 ArchItecture + * Thu Nov 3 wuzx - 2.0.7-4 - Type:feature - CVE:NA