Skip to content

SRV ordering #32

@tzaeschke

Description

@tzaeschke

It seems that the ordering of SRV doesn't exactly follow the specified RFC 2782, see "Weight" on page 3.

func (s byPriority) Less(i, j int) bool {

The RFC suggests ordering by weight and then picking a random entry based on the incremental sum of weights. I don´t think this is equivalent to what is implemented here, but I am not sure how much the result differs.

Potentially more critical is that the current implementation seems to make Less(...) non-deterministic, this may have weird consequences, depending on the sorting algorithm that is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions