diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2010-02-01 10:22:07 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2010-02-01 10:22:07 +0000 |
commit | 0b32db0c31d0365d28b6d8726e7596438b74d370 (patch) | |
tree | d4bdba09e61ddd7ccb05ae9d7cb73bc53d013f1a /usr.sbin/ospfd | |
parent | 0b3e543aade4bf5bed93ea634da6fb56dd215276 (diff) |
Fix logic error (&& vs. ||), found while looking for inspiration for smtpd
state machine needed by the features that are coming along.
ok claudio@
Diffstat (limited to 'usr.sbin/ospfd')
-rw-r--r-- | usr.sbin/ospfd/hello.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/hello.c b/usr.sbin/ospfd/hello.c index f1be89ee8e5..d461102cf0e 100644 --- a/usr.sbin/ospfd/hello.c +++ b/usr.sbin/ospfd/hello.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hello.c,v 1.15 2009/01/31 08:55:00 claudio Exp $ */ +/* $OpenBSD: hello.c,v 1.16 2010/02/01 10:22:06 jacekm Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -122,7 +122,7 @@ recv_hello(struct iface *iface, struct in_addr src, u_int32_t rtr_id, char *buf, u_int32_t nbr_id; int nbr_change = 0; - if (len < sizeof(hello) && (len & 0x03)) { + if (len < sizeof(hello) || (len & 0x03)) { log_warnx("recv_hello: bad packet size, interface %s", iface->name); return; |