Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Nix to properly work with stores using a scoped IPv6 address #4646

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Mar 16, 2021

According to RFC4007[1], IPv6 addresses can have a so-called zone_id
separated from the actual address with % as delimiter. In contrast to
Nix 2.3, the version on master doesn't recognize it as such:

$ nix ping-store --store ssh://root@fe80::1%18 --experimental-features nix-command
warning: 'ping-store' is a deprecated alias for 'store ping'
error: --- Error ----------------------------------------------------------------- nix
don't know how to open Nix store 'ssh://root@fe80::1%18'

I modified the IPv6 match-regex accordingly to optionally detect this
part of the address. As we don't seem to do anything special with it, I
decided to leave it as part of the URL for now.

Fixes #4490

[1] https://tools.ietf.org/html/rfc4007


@maisiliym can you check whether this commit fixes the problem for you?

cc @edolstra @blaggacao

According to RFC4007[1], IPv6 addresses can have a so-called zone_id
separated from the actual address with `%` as delimiter. In contrast to
Nix 2.3, the version on `master` doesn't recognize it as such:

    $ nix ping-store --store ssh://root@fe80::1%18 --experimental-features nix-command
    warning: 'ping-store' is a deprecated alias for 'store ping'
    error: --- Error ----------------------------------------------------------------- nix
    don't know how to open Nix store 'ssh://root@fe80::1%18'

I modified the IPv6 match-regex accordingly to optionally detect this
part of the address. As we don't seem to do anything special with it, I
decided to leave it as part of the URL for now.

Fixes NixOS#4490

[1] https://tools.ietf.org/html/rfc4007
Copy link
Member

@roberth roberth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it conforms to the rfc.

(urls are such a gift, mumble mumble)

@edolstra edolstra merged commit 6749d9e into NixOS:master Mar 23, 2021
@Ma27 Ma27 deleted the support-scoped-v6 branch March 23, 2021 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link-local address store broke recently
3 participants