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

ip6addrctl: Reference RFC 6724 instead #1375

Merged
merged 26 commits into from
Sep 6, 2024

Conversation

jlduran
Copy link
Member

@jlduran jlduran commented Aug 10, 2024

ip6addrctl.8: Reference RFC 6724 instead

Commit e695500 updated the policy table to match RFC 6724, which obsoletes RFC 3484.

Add a reference to RFC 6724, and mark it up as a technical report (%R).


ip6addrctl: Update the sample configuration file

Update the sample ip6addrctl.conf.sample file to match the default policy, currently based on RFC 6724.


getaddrinfo.{1,3}: Cross-reference ip6addrctl(8)

Copy link
Contributor

@concussious concussious left a comment

Choose a reason for hiding this comment

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

I think this is a very nice addition. These RFCs are standards for this implementation, right? Would you be willing to s/EE ALSO/TANDARDS/?

Edit: If you do so, you will need a .Pp in between the bibliographic blocks to preserve the spacing.

@jlduran jlduran force-pushed the ip6addrctl-rfc-6724 branch from 6191dd6 to 635d61f Compare August 11, 2024 00:22
@jlduran
Copy link
Member Author

jlduran commented Aug 11, 2024

I think this is a very nice addition. These RFCs are standards for this implementation, right? Would you be willing to s/EE ALSO/TANDARDS/?

Edit: If you do so, you will need a .Pp in between the bibliographic blocks to preserve the spacing.

Done! Thank you!

Copy link
Contributor

@concussious concussious left a comment

Choose a reason for hiding this comment

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

LGTM!

@concussious
Copy link
Contributor

Please excuse me for not following though enough initially, but I had some new ideas:

  1. Looking at the referenced commit, updating to the new standard was MFC'd to 13.0, therefore this documentation fix should also have a commit message trailer like MFC after: 3 days.

  2. Since RFC 6724 obsoletes RFC 3484 (and crossreferences it), does it make sense to remove RFC 3484?

  3. The standards sections often uses a syntax like:

.Nm
conforms to
.Rs
...

Or is expected to conform to. Thoughts?

@jlduran
Copy link
Member Author

jlduran commented Aug 11, 2024

  1. Looking at the referenced commit, updating to the new standard was MFC'd to 13.0, therefore this documentation fix should also have a commit message trailer like MFC after: 3 days.

Yes, but normally I do not add that line. It has usually been up to the committer. If I remember correctly, some committers have automated workflows, that add the GH pull request line, the Reviewed by line, etc. By applying the MFC line, instead of helping, I'm getting in the way.

  1. Since RFC 6724 obsoletes RFC 3484 (and crossreferences it), does it make sense to remove RFC 3484?

It is a valid point. I'll also update the sample file, although it is not installed.

  1. The standards sections often uses a syntax like:
.Nm
conforms to
.Rs
...

Or is expected to conform to. Thoughts?

Yes, it usually refers to some POSIX standard(s), and normally not cited like a bibliography. These RFCs are "proposed standards", technically not standards (but mature, well-reviewed specifications). Let me know if we should move them back to the SEE ALSO section.

@concussious
Copy link
Contributor

I recently found out that was the case for the pull request trailer, but I'm still under the impression that MFC is up to the author to suggest (and apologize I am mistaken).

I still think that they belong in standards if you find that language inappropriate, but all of these choices are your own.

My suggestions/questions/approval is just one reviewer's efforts to be helpful. Thanks!

@jlduran jlduran force-pushed the ip6addrctl-rfc-6724 branch from 9c3dc6b to d3a7373 Compare August 11, 2024 03:53
@jlduran jlduran changed the title ip6addrctl.8: Reference RFC 6724 as well ip6addrctl.8: Reference RFC 6724 instead Aug 11, 2024
@jlduran jlduran force-pushed the ip6addrctl-rfc-6724 branch 2 times, most recently from cc701dd to 260d1ec Compare August 13, 2024 04:26
@jlduran jlduran force-pushed the ip6addrctl-rfc-6724 branch 2 times, most recently from 8dd6043 to 529b155 Compare August 22, 2024 13:52
@jlduran
Copy link
Member Author

jlduran commented Aug 22, 2024

I still think that they belong in standards if you find that language inappropriate, but all of these choices are your own.

While I also agree, I'll leave it under SEE ALSO, to match the related getaddrinfo(3) man page, and marking it up as %R (Technical Report).

My suggestions/questions/approval is just one reviewer's efforts to be helpful. Thanks!

Highly appreciated, thank you!

@jlduran jlduran changed the title ip6addrctl.8: Reference RFC 6724 instead ip6addrctl: Reference RFC 6724 instead Aug 22, 2024
@concussious
Copy link
Contributor

If you provide some instructions, I would be happy to test this change.

@jlduran
Copy link
Member Author

jlduran commented Aug 23, 2024

If you provide some instructions, I would be happy to test this change.

It is no big deal, ip6addrctl(8) is a user space utility that allows you to configure a source address selection policy, as outlined in RFC 6724.

We'll be using The KAME project site for testing, as a tribute to the FreeBSD IPv6 stack. As much as I'd like to test with a dancing turtle (kame 亀), different browser implementations will make it hard. So we'll stick to the terminal.

  1. Verify that our dual-stack (IPv6 and IPv4) is working:

    % ip6addrctl 
    Prefix                          Prec Label      Use
    ::1/128                           50     0        0 # Loopback
    ::/0                              40     1 NNNNNNNN # Default unicast route
    ::ffff:0.0.0.0/96                 35     4        0 # IPv4-mapped
    2002::/16                         30     2        0 # 6to4
    2001::/32                          5     5        0 # Teredo
    fc00::/7                           3    13        0 # ULA
    ::/96                              1     3        0 # IPv4-compatible [Deprecated (RFC 4291)]
    fec0::/10                          1    11        0 # Site-local (RFC 1884)
    3ffe::/16                          1    12        0 # 6bone (RFC 5156) [Returned]

    By default, FreeBSD uses the table in RFC 6724, changed in e695500.

  2. Using getaddrinfo(1), query The KAME project's web site. getaddrinfo(1) is simply a user space wrapper for getaddrinfo(3), which is ultimately our objective.

    % getaddrinfo www.kame.net
    dgram inet6 udp 2001:2f0:0:8800::1:1 0
    dgram inet6 udp 2001:2f0:0:8800:226:2dff:fe0b:4311 0
    stream inet6 tcp 2001:2f0:0:8800::1:1 0
    stream inet6 tcp 2001:2f0:0:8800:226:2dff:fe0b:4311 0
    seqpacket inet6 sctp 2001:2f0:0:8800::1:1 0
    seqpacket inet6 sctp 2001:2f0:0:8800:226:2dff:fe0b:4311 0
    dgram inet udp 210.155.141.200 0
    stream inet tcp 210.155.141.200 0
    seqpacket inet sctp 210.155.141.200 0

    Notice how the IPv6 addresses are shown first.

  3. We'll change the precedence, so that IPv4-mapped addresses are preferred. We can easily do this by issuing service ip6addrctl prefer_ipv4, but we'll use ip6addrctl and our sample file.

    Create a copy of the ip6addrctl.conf.sample file updated in this patch, and assign the line that contains the label 4 (IPv4-mapped) a precedence of 100, as stated in section 10.3 of RFC 6724.

    The resulting file should look like this:

    % cat myip6addrctl.conf
    # default policy table based on RFC 6724.
    # usage: ip6addrctl install path_to_this_file
    #
    #
    #Format:
    #Prefix       Precedence Label
    ::1/128               50     0
    ::/0                  40     1 # <- 40 precedence, lower than
    ::ffff:0:0/96        100     4 # <- 100 precedence
    2002::/16             30     2
    2001::/32              5     5
    fc00::/7               3    13
    ::/96                  1     3
    fec0::/10              1    11
    3ffe::/16              1    12
  4. Flush the current policy, and issue the command as documented in the file:

    # ip6addrctl flush
    # ip6addrctl install myip6addrctl.conf
  5. Verify that IPv4-mapped addresses have a priority of 100, and test with The KAME project. Your system now prefers IPv4 addresses:

    % getaddrinfo www.kame.net
    dgram inet udp 210.155.141.200 0
    stream inet tcp 210.155.141.200 0
    seqpacket inet sctp 210.155.141.200 0
    dgram inet6 udp 2001:2f0:0:8800:226:2dff:fe0b:4311 0
    dgram inet6 udp 2001:2f0:0:8800::1:1 0
    stream inet6 tcp 2001:2f0:0:8800:226:2dff:fe0b:4311 0
    stream inet6 tcp 2001:2f0:0:8800::1:1 0
    seqpacket inet6 sctp 2001:2f0:0:8800:226:2dff:fe0b:4311 0
    seqpacket inet6 sctp 2001:2f0:0:8800::1:1 0
  6. Revert by issuing service ip6addrctl prefer_ipv6 and removing the test file.

Perhaps, a more realistic scenario would be when an organization that only uses a Unique Local Addresses (ULA) prefix internally, and Network Prefix Translates (NPTv6) it into a Global Unicast Addresss (GUA) prefix (some network administrators are used to a similar setup with IPv4). The problem is that ULAs have a precedence of 3 by default, lower than the 35 assigned to IPv4-mapped addresses. Manually assigning ULAs a higher precedence should be necessary (ouch!).

At any rate, this is a not-so-exciting change. It is mostly a documentation update, there is really nothing to test. But thank you for the offer!

Although, there is an effort to modernize/cleanup some userland utilities, by using getaddrinfo(3), for example. That can really benefit from testing!

@jlduran
Copy link
Member Author

jlduran commented Aug 23, 2024

cc/ @hrs-allbsd @lwhsu

@markjdb
Copy link
Member

markjdb commented Aug 23, 2024

@glebius does this change look ok to you?

Copy link
Contributor

@hrs-allbsd hrs-allbsd left a comment

Choose a reason for hiding this comment

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

It looks good to me. Since the sample configuration file is not installed, simply dropping it might be another option.

@bsdimp bsdimp added the ready label Aug 23, 2024
@bsdimp bsdimp self-assigned this Aug 23, 2024
@concussious
Copy link
Contributor

Thanks @jlduran! Awesome detailed instructions!

@glebius
Copy link
Member

glebius commented Aug 27, 2024

@glebius does this change look ok to you?

To be fair, don't feel myself expert here. Maybe @AlexanderChernikov or @bu7cher can help?

bsdimp pushed a commit to VexedUXR/freebsd-src that referenced this pull request Sep 6, 2024
Commit e695500 updated the policy table
to match RFC 6724, which obsoletes RFC 3484.

Add a reference to RFC 6724, and mark it up as a technical report (%R).

MFC after:	3 days
Signed-off-by:	Jose Luis Duran <[email protected]>

Reviewed by: imp, glebius
Pull Request: freebsd#1375
bsdimp pushed a commit to sebhub/freebsd-src that referenced this pull request Sep 6, 2024
Update the sample ip6addrctl.conf.sample file to match the default
policy, currently based on RFC 6724.

MFC after:	3 days
Signed-off-by:	Jose Luis Duran <[email protected]>

Reviewed by: imp, glebius
Pull Request: freebsd#1375
bsdimp pushed a commit to VexedUXR/freebsd-src that referenced this pull request Sep 6, 2024
Reviewed by: imp, glebius
Pull Request: freebsd#1375
@bsdimp bsdimp force-pushed the ip6addrctl-rfc-6724 branch from f581bc3 to 6197105 Compare September 6, 2024 18:34
wy-chung and others added 17 commits September 6, 2024 12:34
This provides functionality for a click which is partially unreleased
and then allows the user to continue moving the mousepad as if were not
invoked as a full click

Signed-off-by: Joshua Rogers <[email protected]>
Reviewed by: imp, wulf
Pull Request: freebsd#1365
This patch allows scrolling with multiple fingers simultaneously, in
line with how wsp trackpads function on MacOS.

Two new tunables are added: hw.usb.wsp.max_finger_area and
hw.usb.wsp.max_double_tap_distance.

max_finger_area defines the maximum size which the driver registered an
object on trackpad as a finger.
Previously, this value was hardcoded as 1200, which was too low to
register thumb-clicks.

max_double_tap_distance defines the maximum distance between two
fingers which will register as a double-click.

Signed-off-by: Joshua Rogers <[email protected]>
Reviewed by: imp, wulf
Pull Request: freebsd#1365
Also correctly use tun.max_double_tap_distance for maximum distance
of fingers for vertical scrolling.

Signed-off-by: Joshua Rogers <[email protected]>
Reviewed by: imp, wulf
Pull Request: freebsd#1365
The struct timespec tv_sec member is of type time_t.  Make sure that all
variables related to this member are of the type time_t.  This is important for
targets where long is a 32-bit type and time_t a 64-bit type.

Reviewed by: imp
Pull Request: freebsd#1373
Commit e695500 updated the policy table
to match RFC 6724, which obsoletes RFC 3484.

Add a reference to RFC 6724, and mark it up as a technical report (%R).

MFC after:	3 days
Signed-off-by:	Jose Luis Duran <[email protected]>

Reviewed by: imp, glebius
Pull Request: freebsd#1375
Update the sample ip6addrctl.conf.sample file to match the default
policy, currently based on RFC 6724.

MFC after:	3 days
Signed-off-by:	Jose Luis Duran <[email protected]>

Reviewed by: imp, glebius
Pull Request: freebsd#1375
Reviewed by: imp, glebius
Pull Request: freebsd#1375
The error was always returned, even after handling the sysctl, breaking
installworld under Linux.

Sponsored by:		https://www.patreon.com/valpackett

Reviewed by: imp
Pull Request: freebsd#1376
MFC after:	3 days

Reviewed by: imp
Pull Request: freebsd#1378
MFC after:	3 days

Reviewed by: imp
Pull Request: freebsd#1379
Fixes:		86c06f (Remove GEOM_SCHED class and gsched)
MFC after:	3 days

Reviewed by: imp
Pull Request: freebsd#1380
MFC after:	3 days

Reviewed by: imp
Pull Request: freebsd#1382
+ consistent document description languague with other USB-BaseT drivers
+ mention newly added adapters from 6ea4d9
+ attempt to mention rgephy(4) phys feed into ure interfaces

Fixes:		6ea4d9 (Move RTL8156 from cdce(4) to ure(4))
MFC after:	3 days

Reviewed by: imp
Pull Request: freebsd#1384
Signed-off-by: Tom Hukins <[email protected]>
Reviewed by: imp
Pull Request: freebsd#1385
Add logic that checks if the code doesn't overflow
ACPI_EXTENDED_HID_DEVICE_PATH node when searching for optional
strings. If the string is not provided in the device path node
default value of "\0" is used.

Upstream PR:	https://bugzilla.tianocore.org/show_bug.cgi?id=4555
Obtained from:	tianocore/edk2@96ed60d

Reviewed by: imp
Pull Request: freebsd#1388
Since 26b9e1f codel was fixed but traffic was not flowing for
pie too. Apply the same fix.

MFC after:	1 week
Sponsored by:	OPNsense
Differential Revision:	https://reviews.freebsd.org/D46182
Also see:	https://redmine.pfsense.org/issues/13996
Also see:	https://forum.opnsense.org/index.php?topic=41827.0
Reviewed by: imp, markj
Pull Request: freebsd#1390
@bsdimp bsdimp force-pushed the ip6addrctl-rfc-6724 branch from 6197105 to 2b7f289 Compare September 6, 2024 18:34
@freebsd-git freebsd-git merged commit 2b7f289 into freebsd:main Sep 6, 2024
102 of 121 checks passed
freebsd-git pushed a commit that referenced this pull request Sep 22, 2024
Update the sample ip6addrctl.conf.sample file to match the default
policy, currently based on RFC 6724.

MFC after:	3 days
Signed-off-by:	Jose Luis Duran <[email protected]>

Reviewed by: imp, glebius
Pull Request: #1375

(cherry picked from commit 6bfbfc8)
freebsd-git pushed a commit that referenced this pull request Sep 22, 2024
Commit e695500 updated the policy table
to match RFC 6724, which obsoletes RFC 3484.

Add a reference to RFC 6724, and mark it up as a technical report (%R).

MFC after:	3 days
Signed-off-by:	Jose Luis Duran <[email protected]>

Reviewed by: imp, glebius
Pull Request: #1375

(cherry picked from commit 3272054)
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Dec 3, 2024
Commit e695500 updated the policy table
to match RFC 6724, which obsoletes RFC 3484.

Add a reference to RFC 6724, and mark it up as a technical report (%R).

MFC after:	3 days
Signed-off-by:	Jose Luis Duran <[email protected]>

Reviewed by: imp, glebius
Pull Request: freebsd/freebsd-src#1375
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Dec 3, 2024
Update the sample ip6addrctl.conf.sample file to match the default
policy, currently based on RFC 6724.

MFC after:	3 days
Signed-off-by:	Jose Luis Duran <[email protected]>

Reviewed by: imp, glebius
Pull Request: freebsd/freebsd-src#1375
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Dec 3, 2024
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Dec 4, 2024
Commit e695500 updated the policy table
to match RFC 6724, which obsoletes RFC 3484.

Add a reference to RFC 6724, and mark it up as a technical report (%R).

MFC after:	3 days
Signed-off-by:	Jose Luis Duran <[email protected]>

Reviewed by: imp, glebius
Pull Request: freebsd/freebsd-src#1375
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Dec 4, 2024
Update the sample ip6addrctl.conf.sample file to match the default
policy, currently based on RFC 6724.

MFC after:	3 days
Signed-off-by:	Jose Luis Duran <[email protected]>

Reviewed by: imp, glebius
Pull Request: freebsd/freebsd-src#1375
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Dec 4, 2024
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Dec 4, 2024
Commit e695500 updated the policy table
to match RFC 6724, which obsoletes RFC 3484.

Add a reference to RFC 6724, and mark it up as a technical report (%R).

MFC after:	3 days
Signed-off-by:	Jose Luis Duran <[email protected]>

Reviewed by: imp, glebius
Pull Request: freebsd/freebsd-src#1375
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Dec 4, 2024
Update the sample ip6addrctl.conf.sample file to match the default
policy, currently based on RFC 6724.

MFC after:	3 days
Signed-off-by:	Jose Luis Duran <[email protected]>

Reviewed by: imp, glebius
Pull Request: freebsd/freebsd-src#1375
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.