Hi,
RfC 5340 says that for intra area prefix LSAs metric should be set to 0
in case of point-to-multipoint or loopback interfaces. Otherwise metric
should be set to the value of the interfaces output cost.
ospf6d currently sends intra area prefix LSAs *always* with metric 0.
Below diff fixes this.
OK?
Remi
Index: rde.c
===================================================================
RCS file: /cvs/src/usr.sbin/ospf6d/rde.c,v
retrieving revision 1.72
diff -u -p -r1.72 rde.c
--- rde.c 12 Aug 2017 16:27:50 -0000 1.72
+++ rde.c 5 Jun 2018 20:45:03 -0000
@@ -1301,7 +1301,6 @@ append_prefix_lsa(struct lsa **lsa, u_in
/* Append prefix to LSA. */
copy = (struct lsa_prefix *)(new_lsa + *len);
memcpy(copy, prefix, lsa_prefix_len);
- copy->metric = 0;
*lsa = (struct lsa *)new_lsa;
*len = new_len;
@@ -1514,6 +1513,7 @@ orig_intra_lsa_rtr(struct area *area, st
if (iface->type == IF_TYPE_POINTOMULTIPOINT ||
iface->state & IF_STA_LOOPBACK) {
lsa_prefix->prefixlen = 128;
+ lsa_prefix->metric = 0;
} else {
lsa_prefix->prefixlen = ia->prefixlen;
lsa_prefix->metric = htons(iface->metric);