diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2009-02-03 14:12:23 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2009-02-03 14:12:23 +0000 |
commit | a2303c89ae9cbfb02ed6e6c1329e99c8c6656ff9 (patch) | |
tree | 8f47b2d49d7516c3a44d22f37fa48aac5206ec48 | |
parent | a2e74a5bafb0f621d5594974ef3b54ebca27e117 (diff) |
In Intra-Area-Prefix LSAs, set the LA-bit for all prefixes of 128-bit
length, regardless of interface type.
Allowed by RFC5340 and ok claudio@
-rw-r--r-- | usr.sbin/ospf6d/ospfe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ospf6d/ospfe.c b/usr.sbin/ospf6d/ospfe.c index a3c4c94c155..84ac7a55809 100644 --- a/usr.sbin/ospf6d/ospfe.c +++ b/usr.sbin/ospf6d/ospfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfe.c,v 1.21 2009/02/03 14:02:01 stsp Exp $ */ +/* $OpenBSD: ospfe.c,v 1.22 2009/02/03 14:12:22 stsp Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -1113,12 +1113,14 @@ orig_intra_lsa_rtr(struct iface *iface_arg) if (iface->type == IF_TYPE_POINTOMULTIPOINT || iface->state == IF_STA_LOOPBACK) { lsa_prefix.prefixlen = 128; - lsa_prefix.options = OSPF_PREFIX_LA; } else { lsa_prefix.prefixlen = ia->prefixlen; lsa_prefix.metric = htons(iface->metric); } + if (lsa_prefix.prefixlen == 128) + lsa_prefix.options = OSPF_PREFIX_LA; + inet6applymask(&prefix, &ia->addr, lsa_prefix.prefixlen); log_debug("orig_intra_lsa_rtr: prefix %s, interface %s", log_in6addr(&prefix), iface->name); |