Skip to contentSkip to conversation

man/man5/gai.conf: Labels have a label not a precedence

PATCH In review [email protected] 3 participants 6 messages Jan 4 – Jan 14 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 man/man5/gai.conf: Labels have a label not a precedence

From: "Dr. David Alan Gilbert" <[email protected]>

The numeric value on a label entry is a label which is separate from the precedences. Labels are compared with other labels, not precedences.

Rename the field.

---
 man/man5/gai.conf.5 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man/man5/gai.conf.5 +2 -2
index 4aff0b0b9..ef330995d 100644
@@ -26,7 +26,7 @@ .SH DESCRIPTION
 .P
 The keywords currently recognized are:
 .TP
-.BI label\~ netmask\~precedence
+.BI label\~ netmask\~label
 The value is added to the label table used in the RFC\ 3484 sorting.
 If any
 .B label
@@ -35,7 +35,7 @@ .SH DESCRIPTION
 All the label definitions
 of the default table which are to be maintained have to be duplicated.
 Following the keyword,
-the line has to contain a network mask and a precedence value.
+the line has to contain a network mask and a label value.
 .TP
 .BI precedence\~ netmask\~precedence
 This keyword is similar to
Signature · 1 line
2.52.0
#1 lore raw

Hi David,

Quoted 5 lines · On Sun, Jan 04, 2026 at 10:04:38PM +0000, [email protected] wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

The numeric value on a label entry is a label which is separate from the precedences. Labels are compared with other labels, not precedences.

Is there any source to verify this?

Cheers,
Alex

Quoted 33 lines

Rename the field.

---
 man/man5/gai.conf.5 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man/man5/gai.conf.5 +2 -2
index 4aff0b0b9..ef330995d 100644
@@ -26,7 +26,7 @@ .SH DESCRIPTION
 .P
 The keywords currently recognized are:
 .TP
-.BI label\~ netmask\~precedence
+.BI label\~ netmask\~label
 The value is added to the label table used in the RFC\ 3484 sorting.
 If any
 .B label
@@ -35,7 +35,7 @@ .SH DESCRIPTION
 All the label definitions
 of the default table which are to be maintained have to be duplicated.
 Following the keyword,
-the line has to contain a network mask and a precedence value.
+the line has to contain a network mask and a label value.
 .TP
 .BI precedence\~ netmask\~precedence
 This keyword is similar to
Signature · 1 line
2.52.0
Signature · 1 line
<https://www.alejandro-colomar.es>
#2 lore raw
Quoted 1 line · * Alejandro Colomar ([email protected]) wrote:

Hi David,

Hi Alex,

Quoted 8 lines · On Sun, Jan 04, 2026 at 10:04:38PM +0000, [email protected] wrote:
Quoted 5 lines

From: "Dr. David Alan Gilbert" <[email protected]>

The numeric value on a label entry is a label which is separate from the precedences. Labels are compared with other labels, not precedences.

Is there any source to verify this?

The two I checked are:
https://datatracker.ietf.org/doc/html/rfc3484#section-2.1
is the RFC itself, and it talks about the Precedence and labels
as separate values. Note how it's talking in terms of:

If Precedence(A) > Precedence(B), we say that...
and
The algorithms prefer to use a source address S with a destination address D if Label(S) = Label(D).

So it's label compared to label and precedence compared to precedence.

The corresponding bits of glibc are:
https://sourceware.org/git/?p=glibc.git;a=blob;f=nss/getaddrinfo.c;h=c0f496f96c752220e68bf0257d9ff1ffc624ebe6;hb=HEAD#l1525

where the label values are compared in Rule 5, and the precedence values are compared in Rule 6.

Dave

Quoted 40 lines

Cheers,
Alex

Quoted 33 lines

Rename the field.

---
 man/man5/gai.conf.5 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man/man5/gai.conf.5 +2 -2
index 4aff0b0b9..ef330995d 100644
@@ -26,7 +26,7 @@ .SH DESCRIPTION
 .P
 The keywords currently recognized are:
 .TP
-.BI label\~ netmask\~precedence
+.BI label\~ netmask\~label
 The value is added to the label table used in the RFC\ 3484 sorting.
 If any
 .B label
@@ -35,7 +35,7 @@ .SH DESCRIPTION
 All the label definitions
 of the default table which are to be maintained have to be duplicated.
 Following the keyword,
-the line has to contain a network mask and a precedence value.
+the line has to contain a network mask and a label value.
 .TP
 .BI precedence\~ netmask\~precedence
 This keyword is similar to
Signature · 1 line
2.52.0
Signature · 1 line
<https://www.alejandro-colomar.es>
Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
#3 lore raw
Quoted 4 lines · * Dr. David Alan Gilbert ([email protected]) wrote:
Quoted 1 line · * Alejandro Colomar ([email protected]) wrote:

Hi David,

Hi Alex,

Hi Alex,

Quoted 19 lines
Quoted 8 lines · On Sun, Jan 04, 2026 at 10:04:38PM +0000, [email protected] wrote:
Quoted 5 lines

From: "Dr. David Alan Gilbert" <[email protected]>

The numeric value on a label entry is a label which is separate from the precedences. Labels are compared with other labels, not precedences.

Is there any source to verify this?

The two I checked are:
https://datatracker.ietf.org/doc/html/rfc3484#section-2.1
is the RFC itself, and it talks about the Precedence and labels
as separate values. Note how it's talking in terms of:

If Precedence(A) > Precedence(B), we say that...
and
The algorithms prefer to use a source address S with a destination address D if Label(S) = Label(D).

Quoted 7 lines

So it's label compared to label and precedence compared to precedence.

The corresponding bits of glibc are:
https://sourceware.org/git/?p=glibc.git;a=blob;f=nss/getaddrinfo.c;h=c0f496f96c752220e68bf0257d9ff1ffc624ebe6;hb=HEAD#l1525

where the label values are compared in Rule 5, and the precedence values are compared in Rule 6.

Does that explanation I sent make sense?

Dave

Quoted 49 lines

Dave

Quoted 40 lines

Cheers,
Alex

Quoted 33 lines

Rename the field.

---
 man/man5/gai.conf.5 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man/man5/gai.conf.5 +2 -2
index 4aff0b0b9..ef330995d 100644
@@ -26,7 +26,7 @@ .SH DESCRIPTION
 .P
 The keywords currently recognized are:
 .TP
-.BI label\~ netmask\~precedence
+.BI label\~ netmask\~label
 The value is added to the label table used in the RFC\ 3484 sorting.
 If any
 .B label
@@ -35,7 +35,7 @@ .SH DESCRIPTION
 All the label definitions
 of the default table which are to be maintained have to be duplicated.
 Following the keyword,
-the line has to contain a network mask and a precedence value.
+the line has to contain a network mask and a label value.
 .TP
 .BI precedence\~ netmask\~precedence
 This keyword is similar to
Signature · 1 line
2.52.0
Signature · 1 line
<https://www.alejandro-colomar.es>
Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
#4 lore raw

Hi Dave,

Quoted 28 lines · Dr. David Alan Gilbert
Quoted 4 lines · * Dr. David Alan Gilbert ([email protected]) wrote:
Quoted 1 line · * Alejandro Colomar ([email protected]) wrote:

Hi David,

Hi Alex,

Hi Alex,

Quoted 21 lines
Quoted 8 lines · On Sun, Jan 04, 2026 at 10:04:38PM +0000, [email protected] wrote:
Quoted 5 lines

From: "Dr. David Alan Gilbert" <[email protected]>

The numeric value on a label entry is a label which is separate from the precedences. Labels are compared with other labels, not precedences.

Is there any source to verify this?

The two I checked are:
https://datatracker.ietf.org/doc/html/rfc3484#section-2.1
is the RFC itself, and it talks about the Precedence and labels
as separate values. Note how it's talking in terms of:

If Precedence(A) > Precedence(B), we say that...
and
The algorithms prefer to use a source address S with a destination address D if Label(S) = Label(D).

So it's label compared to label and precedence compared to precedence.

Quoted 7 lines
Quoted 5 lines

The corresponding bits of glibc are:
https://sourceware.org/git/?p=glibc.git;a=blob;f=nss/getaddrinfo.c;h=c0f496f96c752220e68bf0257d9ff1ffc624ebe6;hb=HEAD#l1525

where the label values are compared in Rule 5, and the precedence values are compared in Rule 6.

Does that explanation I sent make sense?

Thanks for the ping, and sorry for being slow!

I've verified now, and have applied the patch. Thanks for the patch and for the follow-up links and details!

Have a lovely night!
Alex

Quoted 57 lines

Dave

Quoted 49 lines

Dave

Quoted 40 lines

Cheers,
Alex

Quoted 33 lines

Rename the field.

---
 man/man5/gai.conf.5 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man/man5/gai.conf.5 +2 -2
index 4aff0b0b9..ef330995d 100644
@@ -26,7 +26,7 @@ .SH DESCRIPTION
 .P
 The keywords currently recognized are:
 .TP
-.BI label\~ netmask\~precedence
+.BI label\~ netmask\~label
 The value is added to the label table used in the RFC\ 3484 sorting.
 If any
 .B label
@@ -35,7 +35,7 @@ .SH DESCRIPTION
 All the label definitions
 of the default table which are to be maintained have to be duplicated.
 Following the keyword,
-the line has to contain a network mask and a precedence value.
+the line has to contain a network mask and a label value.
 .TP
 .BI precedence\~ netmask\~precedence
 This keyword is similar to
Signature · 1 line
2.52.0
Signature · 1 line
<https://www.alejandro-colomar.es>
Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
Signature · 1 line
<https://www.alejandro-colomar.es>
#5 lore raw
Quoted 37 lines · * Alejandro Colomar ([email protected]) wrote:

Hi Dave,

Quoted 34 lines · Dr. David Alan Gilbert
Quoted 4 lines · * Dr. David Alan Gilbert ([email protected]) wrote:
Quoted 1 line · * Alejandro Colomar ([email protected]) wrote:

Hi David,

Hi Alex,

Hi Alex,

Quoted 26 lines
Quoted 8 lines · On Sun, Jan 04, 2026 at 10:04:38PM +0000, [email protected] wrote:
Quoted 5 lines

From: "Dr. David Alan Gilbert" <[email protected]>

The numeric value on a label entry is a label which is separate from the precedences. Labels are compared with other labels, not precedences.

Is there any source to verify this?

The two I checked are:
https://datatracker.ietf.org/doc/html/rfc3484#section-2.1
is the RFC itself, and it talks about the Precedence and labels
as separate values. Note how it's talking in terms of:

If Precedence(A) > Precedence(B), we say that...
and
The algorithms prefer to use a source address S with a destination address D if Label(S) = Label(D).

So it's label compared to label and precedence compared to precedence.

The corresponding bits of glibc are:
https://sourceware.org/git/?p=glibc.git;a=blob;f=nss/getaddrinfo.c;h=c0f496f96c752220e68bf0257d9ff1ffc624ebe6;hb=HEAD#l1525

where the label values are compared in Rule 5, and the precedence values are compared in Rule 6.

Quoted 6 lines
Quoted 1 line

Does that explanation I sent make sense?

Thanks for the ping, and sorry for being slow!

I've verified now, and have applied the patch. Thanks for the patch and for the follow-up links and details!

Thanks!
(I think that's all my gai.conf changes for now; the fallout of me turning on IPv6 at home!)

Dave

Quoted 64 lines

Have a lovely night!
Alex

Quoted 57 lines

Dave

Quoted 49 lines

Dave

Quoted 40 lines

Cheers,
Alex

Quoted 33 lines

Rename the field.

---
 man/man5/gai.conf.5 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man/man5/gai.conf.5 +2 -2
index 4aff0b0b9..ef330995d 100644
@@ -26,7 +26,7 @@ .SH DESCRIPTION
 .P
 The keywords currently recognized are:
 .TP
-.BI label\~ netmask\~precedence
+.BI label\~ netmask\~label
 The value is added to the label table used in the RFC\ 3484 sorting.
 If any
 .B label
@@ -35,7 +35,7 @@ .SH DESCRIPTION
 All the label definitions
 of the default table which are to be maintained have to be duplicated.
 Following the keyword,
-the line has to contain a network mask and a precedence value.
+the line has to contain a network mask and a label value.
 .TP
 .BI precedence\~ netmask\~precedence
 This keyword is similar to
Signature · 1 line
2.52.0
Signature · 1 line
<https://www.alejandro-colomar.es>
Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
Signature · 1 line
<https://www.alejandro-colomar.es>
Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/