summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2005-10-12 09:09:37 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2005-10-12 09:09:37 +0000
commite2947b7ec3684263008f8a220c72cf3ff0622d73 (patch)
treed216d328ee1800d6e6a2fdaaf55a7ec28136a394 /usr.sbin/ospfd
parentc6ebafae316b5aba91d4dc7864724d9446dfef2c (diff)
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@
Diffstat (limited to 'usr.sbin/ospfd')
-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);