diff options
author | 2005-02-09 15:51:30 +0000 | |
---|---|---|
committer | 2005-02-09 15:51:30 +0000 | |
commit | ed5b76e9a8f28ca4ddc72986d43eeeea7477b084 (patch) | |
tree | f1e1e7d86851afd72d2e1b3324e7bb25e592efcf | |
parent | If the router self is the originator of the LS update flood it out (diff) | |
download | wireguard-openbsd-ed5b76e9a8f28ca4ddc72986d43eeeea7477b084.tar.xz wireguard-openbsd-ed5b76e9a8f28ca4ddc72986d43eeeea7477b084.zip |
When sending out hellos, copy the bdr and dr addresses into iface->self.
Without this the election process causes strange results as a router that
announces itself as dr/bdr is prefered over one that doesn't.
-rw-r--r-- | usr.sbin/ospfd/hello.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/hello.c b/usr.sbin/ospfd/hello.c index d7f55b58650..eb76310b17f 100644 --- a/usr.sbin/ospfd/hello.c +++ b/usr.sbin/ospfd/hello.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hello.c,v 1.3 2005/02/07 05:50:59 david Exp $ */ +/* $OpenBSD: hello.c,v 1.4 2005/02/09 15:51:30 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -83,10 +83,14 @@ send_hello(struct iface *iface) hello->rtr_priority = iface->priority; hello->rtr_dead_interval = htonl(iface->dead_interval); - if (iface->dr) + if (iface->dr) { hello->d_rtr = iface->dr->addr.s_addr; - if (iface->bdr) + iface->self->dr.s_addr = iface->dr->addr.s_addr; + } + if (iface->bdr) { hello->bd_rtr = iface->bdr->addr.s_addr; + iface->self->bdr.s_addr = iface->bdr->addr.s_addr; + } ptr += sizeof(*hello); /* active neighbor(s) */ |