Skip to content

adapting the MED to use geographical positions #1

Description

@gregbo

I noticed in set_med_coord.c, euclidean_distance() makes the following call:

ebpf_sqrt((a * a) + (b * b), 6)

whereas in compare_med.c, the difference of the squares of a and b is used. The former looks correct to me, but not the latter, based on my understanding of Euclidean distance.

Also, from reading the documentation in libxbgp/docs/source/rfc_implementing.rst, it seems you are using the latitude and longitude of the routers in question. I think computing the spherical distance, instead of Euclidean distance, would yield more accurate results.

As an aside, I have concerns about using geographical data in general for making network management decisions. At the very least, I hope you will add some text to the documentation advising users of this feature of the risks involved.

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