Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet Sigh, fix some broken logic in the last change t...



details:   https://anonhg.NetBSD.org/src/rev/4e64c149b1e0
branches:  trunk
changeset: 473012:4e64c149b1e0
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun May 16 19:33:27 1999 +0000

description:
Sigh, fix some broken logic in the last change to INADDR_TO_IA(), and make
the macro a little more obvious.  Should fix kern/7589, from Jens A Nilsson.

diffstat:

 sys/netinet/in_var.h |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (26 lines):

diff -r 737b8afbb357 -r 4e64c149b1e0 sys/netinet/in_var.h
--- a/sys/netinet/in_var.h      Sun May 16 19:21:31 1999 +0000
+++ b/sys/netinet/in_var.h      Sun May 16 19:33:27 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in_var.h,v 1.33 1999/05/03 22:12:45 thorpej Exp $      */
+/*     $NetBSD: in_var.h,v 1.34 1999/05/16 19:33:27 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -153,10 +153,12 @@
        /* struct in_ifaddr *ia; */ \
 { \
        for (ia = IN_IFADDR_HASH((addr).s_addr).lh_first; \
-           ia != NULL && !in_hosteq(ia->ia_addr.sin_addr, (addr)) && \
-           (ia->ia_ifp->if_flags & IFF_UP) == 0; \
-           ia = ia->ia_hash.le_next) \
-                continue; \
+            ia != NULL; \
+            ia = ia->ia_hash.le_next) { \
+               if (in_hosteq(ia->ia_addr.sin_addr, (addr)) && \
+                   (ia->ia_ifp->if_flags & IFF_UP) != 0) \
+                       break; \
+       } \
 }
 
 /*



Home | Main Index | Thread Index | Old Index