Hi, I was reading bgpd.conf(5) on how to set the weight. It says:
> For prefixes with equally long paths, the prefix with the larger > weight is selected. However, in bgpd(8), it says: > 8. The path with the lowest local weight is selected. I went to read rde_decide.c to find which is right, prefix_cmp() comment says > Returns an integer greater than or less than 0, according to > whether the prefix p1 is more or less preferred than the prefix p2 and the code is if (asp1->weight > asp2->weight) return 1; Comments? OK? Index: bgpd.8 =================================================================== RCS file: /cvs/src/usr.sbin/bgpd/bgpd.8,v retrieving revision 1.64 diff -u -p -r1.64 bgpd.8 --- bgpd.8 16 Feb 2021 08:29:16 -0000 1.64 +++ bgpd.8 4 Apr 2021 02:38:17 -0000 @@ -90,7 +90,7 @@ Comparison of the BGP session type. Paths learned over an external (EBGP) session are preferred over those learned via an internal (IBGP) session. .It -The path with the lowest local +The path with the highest local .Em weight is selected. .It Cheers, Daniel