File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -34,9 +34,11 @@ RUN cd /tmp \
3434
3535# install criu
3636ENV CRIU_VERSION 2.11.1
37+ COPY tests/hacks/0001-criu-allow-to-ignore-ipv6-if-CRIU_NOIPV6-is-set.patch /tmp/
3738RUN mkdir -p /usr/src/criu \
3839 && curl -sSL https://github.com/xemul/criu/archive/v${CRIU_VERSION}.tar.gz | tar -v -C /usr/src/criu/ -xz --strip-components=1 \
3940 && cd /usr/src/criu \
41+ && cat /tmp/0001-criu-allow-to-ignore-ipv6-if-CRIU_NOIPV6-is-set.patch | patch -p1 \
4042 && make install-criu \
4143 && rm -rf /usr/src/criu
4244
@@ -49,6 +51,8 @@ RUN mkdir -p /go/src/github.com/mvdan \
4951 && go install ./cmd/shfmt \
5052 && rm -rf /go/src/github.com/mvdan
5153
54+ ENV CRIU_NOIPV6 1
55+
5256# setup a playground for us to spawn containers in
5357ENV ROOTFS /busybox
5458RUN mkdir -p ${ROOTFS} \
Original file line number Diff line number Diff line change 1+ From 8a9b1d0e6929d296254a8892e553621d76810e87 Mon Sep 17 00:00:00 2001
2+ From: Andrei Vagin <avagin@openvz.org>
3+ Date: Thu, 2 Mar 2017 14:44:18 -0800
4+ Subject: [PATCH] criu: allow to ignore ipv6 if CRIU_NOIPV6 is set
5+
6+ Signed-off-by: Andrei Vagin <avagin@openvz.org>
7+ ---
8+ criu/kerndat.c | 2 ++
9+ 1 file changed, 2 insertions(+)
10+
11+ diff --git a/criu/kerndat.c b/criu/kerndat.c
12+ index 162ac28..216afe0 100644
13+ --- a/criu/kerndat.c
14+ +++ b/criu/kerndat.c
15+ @@ -433,6 +433,8 @@ out:
16+
17+ static int get_ipv6()
18+ {
19+ + if (getenv("CRIU_NOIPV6"))
20+ + return 0;
21+ if (access("/proc/sys/net/ipv6", F_OK) < 0) {
22+ if (errno == ENOENT) {
23+ pr_debug("ipv6 is disabled\n");
24+ - -
25+ 2.9.3
26+
You can’t perform that action at this time.
0 commit comments