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 @@ -41,9 +41,11 @@ RUN cd /tmp \
4141
4242# install criu
4343ENV CRIU_VERSION 2.12
44+ COPY tests/hacks/0001-criu-allow-to-ignore-ipv6-if-CRIU_NOIPV6-is-set.patch /tmp/
4445RUN mkdir -p /usr/src/criu \
4546 && curl -sSL https://github.com/xemul/criu/archive/v${CRIU_VERSION}.tar.gz | tar -v -C /usr/src/criu/ -xz --strip-components=1 \
4647 && cd /usr/src/criu \
48+ && cat /tmp/0001-criu-allow-to-ignore-ipv6-if-CRIU_NOIPV6-is-set.patch | patch -p1 \
4749 && make install-criu \
4850 && rm -rf /usr/src/criu
4951
@@ -56,6 +58,8 @@ RUN mkdir -p /go/src/github.com/mvdan \
5658 && go install ./cmd/shfmt \
5759 && rm -rf /go/src/github.com/mvdan
5860
61+ ENV CRIU_NOIPV6 1
62+
5963# setup a playground for us to spawn containers in
6064ENV ROOTFS /busybox
6165RUN 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