diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-10-12 09:09:37 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-10-12 09:09:37 +0000 |
commit | e2947b7ec3684263008f8a220c72cf3ff0622d73 (patch) | |
tree | d216d328ee1800d6e6a2fdaaf55a7ec28136a394 /usr.sbin/ospfd | |
parent | c6ebafae316b5aba91d4dc7864724d9446dfef2c (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.c | 6 |
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); |