Sync from SUSE:SLFO:Main vde2 revision b965a3996506c465d66fe0f7c6893e8e

This commit is contained in:
Adrian Schröter 2024-05-04 01:43:37 +02:00
commit 2175025368
7 changed files with 539 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

14
_service Normal file
View File

@ -0,0 +1,14 @@
<services>
<service mode="disabled" name="tar_scm">
<param name="url">https://svn.code.sf.net/p/vde/svn/trunk/vde-2/</param>
<param name="scm">svn</param>
<param name="changesgenerate">enable</param>
<param name="filename">vde2</param>
<param name="versionformat">2.3.2+svn%r</param>
</service>
<service mode="disabled" name="recompress">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service mode="disabled" name="set_version"/>
</services>

BIN
vde2-2.3.2+svn587.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,13 @@
Index: vde2-2.3.2+svn587/src/vde_router/vder_packet.c
===================================================================
--- vde2-2.3.2+svn587.orig/src/vde_router/vder_packet.c
+++ vde2-2.3.2+svn587/src/vde_router/vder_packet.c
@@ -199,7 +199,7 @@ void vder_packet_recv(struct vder_iface
} else {
struct iphdr *hdr = iphead(packet);
uint32_t sender = hdr->saddr;
- uint8_t foot[sizeof(hdr) + 8];
+ uint8_t foot[sizeof(struct iphdr) + 8];
memcpy(foot, footprint(packet), sizeof(struct iphdr) + 8);
if (vder_ip_decrease_ttl(packet)) {

View File

@ -0,0 +1,107 @@
## Description: add some description
## Origin/Author: add some origin or author
## Bug: bug URL
From 5f2c4c7b67617991af65798a4d177ada90f7e463 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Date: Fri, 2 Sep 2016 19:52:49 +0000
Subject: [PATCH] vde_cryptcab: compile against openssl 1.1.0
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
---
src/vde_cryptcab/cryptcab.c | 30 +++++++++++++++++++-----------
1 file changed, 19 insertions(+), 11 deletions(-)
Index: vde2-2.3.2+svn587/src/vde_cryptcab/cryptcab.c
===================================================================
--- vde2-2.3.2+svn587.orig/src/vde_cryptcab/cryptcab.c 2014-11-12 15:23:16.000000000 +0100
+++ vde2-2.3.2+svn587/src/vde_cryptcab/cryptcab.c 2017-09-11 12:55:15.457196155 +0200
@@ -22,7 +22,7 @@ static void Usage(char *programname)
exit(1);
}
-static EVP_CIPHER_CTX ctx;
+static EVP_CIPHER_CTX *ctx;
static int ctx_initialized = 0;
static int encryption_disabled = 0;
static int nfd;
@@ -30,6 +30,10 @@ static unsigned long long mycounter=1;
static struct vde_open_args open_args={.port=0,.group=NULL,.mode=0700};
static int verbose = 0;
+#if OPENSSL_VERSION_NUMBER < 0x10100000
+#define EVP_CIPHER_CTX_reset(x) EVP_CIPHER_CTX_cleanup(x)
+#endif
+
void vc_printlog(int priority, const char *format, ...)
{
va_list arg;
@@ -105,19 +109,21 @@ int data_encrypt(unsigned char *src, uns
}
if (!ctx_initialized) {
- EVP_CIPHER_CTX_init (&ctx);
+ ctx = EVP_CIPHER_CTX_new ();
+ if (!ctx)
+ return -1;
ctx_initialized = 1;
}
- EVP_EncryptInit (&ctx, EVP_bf_cbc (), p->key, p->iv);
- if (EVP_EncryptUpdate (&ctx, dst, &olen, src, len) != 1)
+ EVP_EncryptInit (ctx, EVP_bf_cbc (), p->key, p->iv);
+ if (EVP_EncryptUpdate (ctx, dst, &olen, src, len) != 1)
{
fprintf (stderr,"error in encrypt update\n");
olen = -1;
goto cleanup;
}
- if (EVP_EncryptFinal (&ctx, dst + ulen, &tlen) != 1)
+ if (EVP_EncryptFinal (ctx, dst + ulen, &tlen) != 1)
{
fprintf (stderr,"error in encrypt final\n");
olen = -1;
@@ -126,7 +132,7 @@ int data_encrypt(unsigned char *src, uns
olen += tlen;
cleanup:
- EVP_CIPHER_CTX_cleanup(&ctx);
+ EVP_CIPHER_CTX_reset(ctx);
return olen;
}
@@ -142,19 +148,21 @@ int data_decrypt(unsigned char *src, uns
}
if (!ctx_initialized) {
- EVP_CIPHER_CTX_init (&ctx);
+ ctx = EVP_CIPHER_CTX_new ();
+ if (!ctx)
+ return -1;
ctx_initialized = 1;
}
- EVP_DecryptInit (&ctx, EVP_bf_cbc (), p->key, p->iv);
- if (EVP_DecryptUpdate (&ctx, dst, &olen, src, ulen) != 1)
+ EVP_DecryptInit (ctx, EVP_bf_cbc (), p->key, p->iv);
+ if (EVP_DecryptUpdate (ctx, dst, &olen, src, ulen) != 1)
{
fprintf (stderr,"error in decrypt update\n");
olen = -1;
goto cleanup;
}
- if (EVP_DecryptFinal (&ctx, dst + ulen, &tlen) != 1)
+ if (EVP_DecryptFinal (ctx, dst + ulen, &tlen) != 1)
{
fprintf (stderr,"error in decrypt final, ulen = %d, tlen = %d\n", ulen, tlen);
olen = -1;
@@ -163,7 +171,7 @@ int data_decrypt(unsigned char *src, uns
olen += tlen;
cleanup:
- EVP_CIPHER_CTX_cleanup(&ctx);
+ EVP_CIPHER_CTX_reset (ctx);
return olen;
}

75
vde2.changes Normal file
View File

@ -0,0 +1,75 @@
-------------------------------------------------------------------
Tue Jan 23 14:31:28 UTC 2018 - tchvatal@suse.com
- Drop python2 from the buildrequirements
* This means we lose python bindings but as the package is no
longer developed there is 0 chance to obtain python3 bindings
and the code is not compatible
-------------------------------------------------------------------
Mon Sep 11 10:50:57 UTC 2017 - vcizek@suse.com
- Patch for openssl 1.1 compatibility
* add vde2-openssl_1.1_compatibility.patch from Debian
-------------------------------------------------------------------
Mon Jul 24 13:51:51 UTC 2017 - jengelh@inai.de
- Rename devel subpackages according to shared library guideline.
- Rectify RPM groups.
-------------------------------------------------------------------
Wed Jul 19 20:03:02 UTC 2017 - tchvatal@suse.com
- Add patch to build with our gcc checks:
* vde2-buffer-overflow.patch
- Switch to svn checkout service in order to get something newer
than 2011 tarball
- Update to version 2.3.2+svn587:
* allow pipes on stdin for daemonized switches
* vde_vxlan initial release
* Add format string to fprintf calls.
* Clean up unused variables.
* In 2014, I think we can stop trying to outsmart the compiler. Remove
* "register" storage class.
* Add missing headers in vde_router Makefile.am.
* Add missing format string in snprintf.
* Add missing source files in vde_vxlan Makefile.am.
* Enable vde_over_ns when header is present.
* Remove unused variable in vde_over_ns.
* vde_autolink: Add missing null entry in getopt_long array.
-------------------------------------------------------------------
Wed Jul 19 19:41:03 UTC 2017 - tchvatal@suse.com
- Drop README.SUSE we are better of with the online guides
- Cleanup with spec-cleaner
-------------------------------------------------------------------
Sun Feb 3 07:08:19 UTC 2013 - coolo@suse.com
- update license to new format
-------------------------------------------------------------------
Mon Apr 16 11:13:54 UTC 2012 - andrea@opensuse.org
- new upstream version 2.3.2 (bug fix release)
- disabled paralled job that break build
- added python support
-------------------------------------------------------------------
Thu May 19 15:04:48 UTC 2011 - andrea@opensuse.org
- split out slirpvde to fix legal issues in bug bnc694822
- fixed descriptions on libraries subpackages
-------------------------------------------------------------------
Mon May 9 08:00:57 UTC 2011 - andrea@opensuse.org
- clean up spec file, split out libraries and cryptcab package
-------------------------------------------------------------------
Sun May 8 22:36:57 UTC 2011 - andrea@opensuse.org
- New package

304
vde2.spec Normal file
View File

@ -0,0 +1,304 @@
#
# spec file for package vde2
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: vde2
Version: 2.3.2+svn587
Release: 0
Summary: Virtual Distributed Ethernet
License: GPL-2.0
Group: Productivity/Networking/Other
Url: http://vde.sourceforge.net/
Source0: %{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM: always overflows destination buffer
Patch0: vde2-buffer-overflow.patch
# PATCH-FIX-UPSTREAM: openssl 1.1 compatibility
Patch1: vde2-openssl_1.1_compatibility.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: libpcap-devel
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: pkgconfig(openssl)
Recommends: %{name}-cryptcab = %{version}
Recommends: %{name}-slirp = %{version}
Recommends: kvm
Recommends: qemu
%description
VDE is a virtual network that can be spawned over a set of physical
computer over the Internet
VDE connects together:
(1) real GNU-linux boxes (tuntap)
(2) virtual machines: UML-User Mode Linux, qemu, bochs, MPS.
VDE can be used:
(i) to create a general purpose tunnel (every protocol that runs
on a Ethernet can be put into the tunnel)
(ii) to connect a set of virtual machine to the Internet with no
need of free access of tuntap
(iii) to support mobility: a VDE can stay interconnected despite
of the change of virtual cables, i.e. the change of IP addresses
and interface in the real world
%package cryptcab
Summary: VDE ecryption module
License: GPL-2.0
Group: Productivity/Networking/Other
%description cryptcab
This package contains CryptCab, which can be used
to send encrypted data over an UDP link.
%package slirp
Summary: VDE ecryption module
License: BSD-4-Clause AND MIT
Group: Productivity/Networking/Other
%description slirp
slirpvde is a slirp interface for a VDE network.
Slirpvde connects all the units (virtual or real machines) to the network
of the host where slirpvde runs as it were a NAT/Masquerading router.
The default route is the node 2 (10.0.2.2 in the default network configuration)
and DNS is re-mapped in node 3 (10.0.2.3).
Slirpvde runs using standard user privileges (no need for root access):
all the connections are re-generated by slirpvde itself.
IPv4 only. IPv6 is still unsupported (will be supported when slirpvde
will be rewritten using the LWIPv6 network stack).
%package -n libvdehist0
Summary: VDE history library
License: GPL-2.0
Group: System/Libraries
%description -n libvdehist0
This package contains VDE history library
A library to manage history and command completion for vde mgmt protocol
%package -n libvdemgmt0
Summary: VDE management library
License: GPL-2.0
Group: System/Libraries
%description -n libvdemgmt0
This package contains a library to interact with vde_switch
management console using pre-made unattended scripts.
%package -n libvdeplug3
Summary: VDE plug library
License: GPL-2.0
Group: System/Libraries
%description -n libvdeplug3
This package contains a library that makes programs able to connect
to a local VDE switch. The simplest one is vde_plug, contained in the vde2 package.
%package -n libvdesnmp0
Summary: VDE snmp library
License: GPL-2.0
Group: System/Libraries
%description -n libvdesnmp0
This package contains VDE snmp library
SNMP library for Virtual Distributed Ethernet
%package -n libvdehist-devel
Summary: VDE hist header files
License: GPL-2.0
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: libvdehist0 = %{version}
Obsoletes: libvdehist0-devel < %{version}-%{release}
Provides: libvdehist0-devel = %{version}-%{release}
%description -n libvdehist-devel
This package contains VDE hist header files
%package -n libvdemgmt-devel
Summary: VDE management files
License: GPL-2.0
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: libvdemgmt0 = %{version}
Obsoletes: libvdemgmt0-devel < %{version}-%{release}
Provides: libvdemgmt0-devel = %{version}-%{release}
%description -n libvdemgmt-devel
This package contains VDE management files
%package -n libvdeplug-devel
Summary: VDE plug header files
License: GPL-2.0
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: libvdeplug3 = %{version}
Obsoletes: libvdeplug3-devel < %{version}-%{release}
Provides: libvdeplug3-devel = %{version}-%{release}
%description -n libvdeplug-devel
This package contains VDE plug header files
%package -n libvdesnmp-devel
Summary: VDE SNMP header files
License: GPL-2.0
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: libvdesnmp0 = %{version}
Obsoletes: libvdesnmp0-devel < %{version}-%{release}
Provides: libvdesnmp0-devel = %{version}-%{release}
%description -n libvdesnmp-devel
This package contains VDE SNMP header files.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
autoreconf -fvi
# --enable-experimental even tho weird it has useful features and
# vde2 on its own is no longer developed
%configure \
--disable-silent-rules \
--enable-kernel-switch \
--disable-static \
--enable-experimental \
--disable-python
# Not thread safe makefiles
make -j1
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%post -n libvdehist0 -p /sbin/ldconfig
%postun -n libvdehist0 -p /sbin/ldconfig
%post -n libvdemgmt0 -p /sbin/ldconfig
%postun -n libvdemgmt0 -p /sbin/ldconfig
%post -n libvdeplug3 -p /sbin/ldconfig
%postun -n libvdeplug3 -p /sbin/ldconfig
%post -n libvdesnmp0 -p /sbin/ldconfig
%postun -n libvdesnmp0 -p /sbin/ldconfig
%files
%doc Changelog README COPYING
%doc doc/README.VirtualBox doc/README.qemu doc/vde_autolink-HOWTO
%doc doc/README.UML doc/vdeqemu-HOWTO doc/README.vde_over_ns
%dir %{_libdir}/vde2
%dir %{_libdir}/vde2/vde_l3
%dir %{_sysconfdir}/vde2
%{_bindir}/dpipe
%{_bindir}/kvde_switch
%{_bindir}/unixcmd
%{_bindir}/unixterm
%{_bindir}/vde_autolink
%{_bindir}/vde_l3
%{_bindir}/vde_over_ns
%{_bindir}/vde_pcapplug
%{_bindir}/vde_plug
%{_bindir}/vde_plug2tap
%{_bindir}/vde_switch
%{_bindir}/vde_router
%{_bindir}/vde_vxlan
%{_bindir}/vdecmd
%{_bindir}/vdekvm
%{_bindir}/vdeq
%{_bindir}/vdeqemu
%{_bindir}/vdeterm
%{_bindir}/wirefilter
%{_sbindir}/vde_tunctl
%{_libexecdir}/vdetap
%{_libdir}/vde2/libvdetap.so
%{_libdir}/vde2/vde_l3/bfifo.so
%{_libdir}/vde2/vde_l3/pfifo.so
%{_libdir}/vde2/vde_l3/tbf.so
%dir %{_libdir}/vde2/plugins
%{_libdir}/vde2/plugins/dump.so
%{_libdir}/vde2/plugins/iplog.so
%{_libdir}/vde2/plugins/pdump.so
%config %{_sysconfdir}/vde2/vdecmd
%{_mandir}/man1/*
%{_mandir}/man8/*
%exclude %{_mandir}/man1/vde_cryptcab.*
%exclude %{_mandir}/man1/slirpvde.*
%files cryptcab
%doc Changelog README COPYING
%{_bindir}/vde_cryptcab
%{_mandir}/man1/vde_cryptcab.1%{ext_man}
%files slirp
%doc Changelog README COPYING doc/README.slirpvde
%{_bindir}/slirpvde
%{_mandir}/man1/slirpvde.1%{ext_man}
%files -n libvdehist0
%doc Changelog README COPYING
%{_libdir}/libvdehist.so.0
%{_libdir}/libvdehist.so.0.0.1
%files -n libvdemgmt0
%doc Changelog README COPYING
%dir %{_sysconfdir}/vde2/libvdemgmt
%{_libdir}/libvdemgmt.so.0
%{_libdir}/libvdemgmt.so.0.0.1
%config %{_sysconfdir}/vde2/libvdemgmt/asyncrecv.rc
%config %{_sysconfdir}/vde2/libvdemgmt/closemachine.rc
%config %{_sysconfdir}/vde2/libvdemgmt/openmachine.rc
%config %{_sysconfdir}/vde2/libvdemgmt/sendcmd.rc
%files -n libvdeplug3
%doc Changelog README COPYING COPYING.libvdeplug
%{_libdir}/libvdeplug.so.3
%{_libdir}/libvdeplug.so.3.0.1
%files -n libvdesnmp0
%doc Changelog README COPYING
%{_libdir}/libvdesnmp.so.0
%{_libdir}/libvdesnmp.so.0.0.1
%files -n libvdehist-devel
%doc Changelog README COPYING
%{_includedir}/libvdehist.h
%{_libdir}/libvdehist.so
%{_libdir}/pkgconfig/vdehist.pc
%files -n libvdemgmt-devel
%doc Changelog README COPYING
%{_includedir}/libvdemgmt.h
%{_libdir}/libvdemgmt.so
%{_libdir}/pkgconfig/vdemgmt.pc
%files -n libvdeplug-devel
%doc Changelog README COPYING
%{_includedir}/libvdeplug.h
%{_includedir}/libvdeplug_dyn.h
%{_libdir}/libvdeplug.so
%{_libdir}/pkgconfig/vdeplug.pc
%files -n libvdesnmp-devel
%doc Changelog README COPYING
%{_includedir}/libvdesnmp.h
%{_libdir}/libvdesnmp.so
%{_libdir}/pkgconfig/vdesnmp.pc
%changelog