static networking: Support pointopoint/peer

  • Open
  • quality assurance status badge
Details
3 participants
  • Jonathan Brielmaier
  • Julien Lepiller
  • Ludovic Courtès
Owner
unassigned
Submitted by
Jonathan Brielmaier
Severity
normal
J
J
Jonathan Brielmaier wrote on 25 Dec 2021 14:03
(name . bug-guix)(address . bug-guix@gnu.org)
575f2e6a-8772-a5ec-4ef7-b5701e3bff13@web.de
Hi folks,

it would be nice if `static-networking` would support the pointopoint
or peer parameter. This one is required to get IPv4 at Hetzner Cloud.

The relevant ip statement is:
ip address add IPv4/32 dev eth0 peer 172.31.1.1
^^^^^^^^^^^^^^^

Is this functionality already implemented by guile-netlink? If yes, I
could try to add this feature to our static-networking-service-type :)

~Jonathan
J
J
Julien Lepiller wrote on 25 Dec 2021 17:05
3E5C9B9D-5D39-4A95-A504-EF3A1476FC3F@lepiller.eu
It was not supported in guile-netlink, so I added support for #:peer and other new arguments in addr-add and addr-del. There's no release yet, but I'd be glad if you could check it works as expected (--with-latest=guile-netlink should work).

Le 25 décembre 2021 08:03:16 GMT-05:00, Jonathan Brielmaier <jonathan.brielmaier@web.de> a écrit :
Toggle quote (17 lines)
>
>Hi folks,
>
>it would be nice if `static-networking` would support the pointopoint
>or peer parameter. This one is required to get IPv4 at Hetzner Cloud.
>
>The relevant ip statement is:
>ip address add IPv4/32 dev eth0 peer 172.31.1.1
> ^^^^^^^^^^^^^^^
>
>Is this functionality already implemented by guile-netlink? If yes, I
>could try to add this feature to our static-networking-service-type :)
>
>~Jonathan
>
>
>
Attachment: file
J
J
Jonathan Brielmaier wrote on 12 Jan 2022 23:10
static networking: Support pointopoint/peer
(address . 52788@debbugs.gnu.org)
d8cc2e48-ce9b-9f02-94fc-80c904da6e2f@web.de
Thanks for the fast implementation in guile-netlink! Didn't know how to
use `--with-latest=guile-netlink` in that context so I updated the package:

Toggle diff (147 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm

index 74567830e6..dcb1041136 100644

--- a/gnu/packages/guile-xyz.scm

+++ b/gnu/packages/guile-xyz.scm

@@ -4602,37 +4602,39 @@ (define-public guile-fslib

(license license:agpl3+)))



(define-public guile-netlink

- (package

- (name "guile-netlink")

- (version "1.1.1")

- (source

- (origin

- (method git-fetch)

- (uri (git-reference

- (url "https://git.lepiller.eu/git/guile-netlink")

- (commit version)))

- (file-name (git-file-name name version))

- (sha256

- (base32

- "0jcl6mzqy04if5drflmygmggbgzsxa42mlmskqb3cfqmksq0zj0y"))))

- (build-system gnu-build-system)

- (inputs

- (list guile-3.0))

- (native-inputs

- (list automake

- autoconf

- pkg-config

- guile-3.0 ;for 'guild compile' + guile.m4

- texinfo))

- (home-page "https://git.lepiller.eu/guile-netlink")

- (synopsis "Netlink protocol implementation for Guile")

- (description "Guile Netlink is a GNU Guile library providing an
implementation

+ (let ((commit "b7aa2be9476e0f1b6cc4a7b22ba070c6411cb0ae")

+ (revision "1"))

+ (package

+ (name "guile-netlink")

+ (version (git-version "1.1.1" revision commit))

+ (source

+ (origin

+ (method git-fetch)

+ (uri (git-reference

+ (url "https://git.lepiller.eu/git/guile-netlink")

+ (commit commit)))

+ (file-name (git-file-name name version))

+ (sha256

+ (base32

+ "03f9ads2qj3lj8frlg3pmh0nx4qikqpkhy0fvfy12qivlrfdbvcm"))))

+ (build-system gnu-build-system)

+ (inputs

+ (list guile-3.0))

+ (native-inputs

+ (list automake

+ autoconf

+ pkg-config

+ guile-3.0 ;for 'guild compile' + guile.m4

+ texinfo))

+ (home-page "https://git.lepiller.eu/guile-netlink")

+ (synopsis "Netlink protocol implementation for Guile")

+ (description "Guile Netlink is a GNU Guile library providing an
implementation

of the netlink protocol.



It provides a generic library for writing implementations of a netlink

protocol, a low-level rtnetlink implementation that uses that library
and a

high-level API for network management that uses rtnetlink.")

- (license license:gpl3+)))

+ (license license:gpl3+))))



(define-public guile-gitlab

(package


That was the easy part. The part in gnu/services/base.scm seems to be a
bit over my Guile/gexp skills. And I couldn't find a proper source to
copy-and-paste-and-adapt :P
L
L
Ludovic Courtès wrote on 30 Jan 2022 18:53
(name . Julien Lepiller)(address . julien@lepiller.eu)
87czk99kkm.fsf@gnu.org
Hi Julien,

Julien Lepiller <julien@lepiller.eu> skribis:

Toggle quote (2 lines)
> It was not supported in guile-netlink, so I added support for #:peer and other new arguments in addr-add and addr-del. There's no release yet, but I'd be glad if you could check it works as expected (--with-latest=guile-netlink should work).

Perhaps we also need to update <static-networking> and related code in
(gnu services base) to expose that?

Ludo’.
J
J
Julien Lepiller wrote on 30 Jan 2022 21:08
(name . Ludovic Courtès)(address . ludo@gnu.org)
20220130210841.6be9570e@sybil.lepiller.eu
Le Sun, 30 Jan 2022 18:53:29 +0100,
Ludovic Courtès <ludo@gnu.org> a écrit :

Toggle quote (14 lines)
> Hi Julien,
>
> Julien Lepiller <julien@lepiller.eu> skribis:
>
> > It was not supported in guile-netlink, so I added support for
> > #:peer and other new arguments in addr-add and addr-del. There's no
> > release yet, but I'd be glad if you could check it works as
> > expected (--with-latest=guile-netlink should work).
>
> Perhaps we also need to update <static-networking> and related code in
> (gnu services base) to expose that?
>
> Ludo’.

Yes, otherwise we won't be able to use that in static-networking.
?