summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorremi <remi@cvs.openbsd.org>2019-04-04 19:57:09 +0000
committerremi <remi@cvs.openbsd.org>2019-04-04 19:57:09 +0000
commita29adce91ea94ae83aa474461e5914dc9e890a40 (patch)
tree09ca1d7641e6dec90032d3d36ff1fb7501754013 /usr.sbin
parent02b65352b543147bbe58975d6f114396ef6ce3e8 (diff)
RFC 2328 mandates in 12.4.1.1 that the Link ID of the Type 3 link has to
be set to the subnet's IP address and not the interface address. Bug report and fix from Mitchell Krome. OK claudio@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ospfd/rde_spf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/rde_spf.c b/usr.sbin/ospfd/rde_spf.c
index 736f2e57577..874cdc345cd 100644
--- a/usr.sbin/ospfd/rde_spf.c
+++ b/usr.sbin/ospfd/rde_spf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_spf.c,v 1.76 2015/11/22 13:09:10 claudio Exp $ */
+/* $OpenBSD: rde_spf.c,v 1.77 2019/04/04 19:57:08 remi Exp $ */
/*
* Copyright (c) 2005 Esben Norby <norby@openbsd.org>
@@ -195,7 +195,7 @@ rt_calc(struct vertex *v, struct area *area, struct ospfd_conf *conf)
if (rtr_link->type != LINK_TYPE_STUB_NET)
continue;
- addr.s_addr = rtr_link->id;
+ addr.s_addr = rtr_link->id & rtr_link->data;
adv_rtr.s_addr = htonl(v->adv_rtr);
rt_update(addr, mask2prefixlen(rtr_link->data),