GNU bug report logs - #35229
[PATCH] gnu: docker: Check for error on XFRM.

Previous Next

Package: guix-patches;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Thu, 11 Apr 2019 14:37:02 UTC

Severity: normal

Tags: patch

Done: Danny Milosavljevic <dannym <at> scratchpost.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35229 in the body.
You can then email your comments to 35229 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#35229; Package guix-patches. (Thu, 11 Apr 2019 14:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Danny Milosavljevic <dannym <at> scratchpost.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 11 Apr 2019 14:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: guix-patches <at> gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [PATCH] gnu: docker: Check for error on XFRM.
Date: Thu, 11 Apr 2019 16:36:28 +0200
* gnu/packages/patches/docker-use-fewer-modprobes.patch: Check for error on
XFRM.
---
 .../patches/docker-use-fewer-modprobes.patch  | 30 +++++++++++++++----
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/patches/docker-use-fewer-modprobes.patch b/gnu/packages/patches/docker-use-fewer-modprobes.patch
index 2779e1be5d..4e4a45b6ce 100644
--- a/gnu/packages/patches/docker-use-fewer-modprobes.patch
+++ b/gnu/packages/patches/docker-use-fewer-modprobes.patch
@@ -103,17 +103,35 @@ See <https://github.com/moby/moby/pull/38930>.
  
 --- docker-18.09.0-checkout/vendor/github.com/docker/libnetwork/ns/init_linux.go.orig	2019-03-19 11:23:20.738316699 +0100
 +++ docker-18.09.0-checkout/vendor/github.com/docker/libnetwork/ns/init_linux.go	2019-03-19 11:27:57.149753073 +0100
-@@ -100,12 +100,7 @@
+@@ -76,12 +76,8 @@ func NlHandle() *netlink.Handle {
+ func getSupportedNlFamilies() []int {
+ 	fams := []int{syscall.NETLINK_ROUTE}
+ 	// NETLINK_XFRM test
+-	if err := loadXfrmModules(); err != nil {
+-		if checkXfrmSocket() != nil {
+-			logrus.Warnf("Could not load necessary modules for IPSEC rules: %v", err)
+-		} else {
+-			fams = append(fams, syscall.NETLINK_XFRM)
+-		}
++	if err := checkXfrmSocket(); err != nil {
++		logrus.Warnf("Could not load necessary modules for IPSEC rules: %v", err)
+ 	} else {
+ 		fams = append(fams, syscall.NETLINK_XFRM)
+ 	}
+@@ -99,16 +95,6 @@ func getSupportedNlFamilies() []int {
+ 	return fams
  }
  
- func loadXfrmModules() error {
+-func loadXfrmModules() error {
 -	if out, err := exec.Command("modprobe", "-va", "xfrm_user").CombinedOutput(); err != nil {
 -		return fmt.Errorf("Running modprobe xfrm_user failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err)
 -	}
 -	if out, err := exec.Command("modprobe", "-va", "xfrm_algo").CombinedOutput(); err != nil {
 -		return fmt.Errorf("Running modprobe xfrm_algo failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err)
 -	}
-+	// Those are automatically loaded when someone opens the socket anyway.
- 	return nil
- }
- 
+-	return nil
+-}
+-
+ // API check on required xfrm modules (xfrm_user, xfrm_algo)
+ func checkXfrmSocket() error {
+ 	fd, err := syscall.Socket(syscall.AF_NETLINK, syscall.SOCK_RAW, syscall.NETLINK_XFRM)




Information forwarded to guix-patches <at> gnu.org:
bug#35229; Package guix-patches. (Sun, 14 Apr 2019 15:18:02 GMT) Full text and rfc822 format available.

Message #8 received at 35229 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 35229 <at> debbugs.gnu.org
Subject: Re: [bug#35229] [PATCH] gnu: docker: Check for error on XFRM.
Date: Sun, 14 Apr 2019 17:16:57 +0200
Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

> * gnu/packages/patches/docker-use-fewer-modprobes.patch: Check for error on
> XFRM.

I suppose upstream adopted this, right?  Go for it!

Ludo’.




Reply sent to Danny Milosavljevic <dannym <at> scratchpost.org>:
You have taken responsibility. (Sun, 14 Apr 2019 17:07:02 GMT) Full text and rfc822 format available.

Notification sent to Danny Milosavljevic <dannym <at> scratchpost.org>:
bug acknowledged by developer. (Sun, 14 Apr 2019 17:07:02 GMT) Full text and rfc822 format available.

Message #13 received at 35229-done <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 35229-done <at> debbugs.gnu.org
Subject: Re: [bug#35229] [PATCH] gnu: docker: Check for error on XFRM.
Date: Sun, 14 Apr 2019 19:05:55 +0200
[Message part 1 (text/plain, inline)]
Hi,

On Sun, 14 Apr 2019 17:16:57 +0200
Ludovic Courtès <ludo <at> gnu.org> wrote:

> Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
> 
> > * gnu/packages/patches/docker-use-fewer-modprobes.patch: Check for error on
> > XFRM.  
> 
> I suppose upstream adopted this, right?  Go for it!

It was a request for change from them in the pull request.  The pull request is
still pending.

But I think it's better to check for errors.  So, pushed...
[Message part 2 (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 13 May 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 343 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.