summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2005-10-12 09:09:36 +0000
committerclaudio <claudio@openbsd.org>2005-10-12 09:09:36 +0000
commit52339221a00d829cef17b7079eb6874e254bff35 (patch)
tree54d387bec5b7f3a7b73304a0eb8a5d2a3e228658
parentIn one special condition ospfd sent out ls updates without updating the (diff)
downloadwireguard-openbsd-52339221a00d829cef17b7079eb6874e254bff35.tar.xz
wireguard-openbsd-52339221a00d829cef17b7079eb6874e254bff35.zip
Minor cleanup. Use iface->state & IF_STA_DRORBDR as used in other places
instead of iface->state != (IF_STA_DR | IF_STA_BACKUP). OK norby@
-rw-r--r--usr.sbin/ospfd/packet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/packet.c b/usr.sbin/ospfd/packet.c
index bdfe4a6846e..814694e7df4 100644
--- a/usr.sbin/ospfd/packet.c
+++ b/usr.sbin/ospfd/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.12 2005/09/17 20:03:35 msf Exp $ */
+/* $OpenBSD: packet.c,v 1.13 2005/10/12 09:09:36 claudio Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
@@ -258,8 +258,8 @@ ospf_hdr_sanity_check(const struct ip *ip_hdr, struct ospf_hdr *ospf_hdr,
if (iface->type == IF_TYPE_BROADCAST || iface->type == IF_TYPE_NBMA) {
if (inet_aton(AllDRouters, &addr) == 0)
fatalx("recv_packet: inet_aton");
- if ((ip_hdr->ip_dst.s_addr == addr.s_addr) &&
- (iface->state != (IF_STA_DR | IF_STA_BACKUP))) {
+ if (ip_hdr->ip_dst.s_addr == addr.s_addr &&
+ (iface->state & IF_STA_DRORBDR) == 0) {
log_debug("recv_packet: invalid destination IP in "
"state %s, interface %s",
if_state_name(iface->state), iface->name);