]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Modify the dlpi code to accept getmsg() returning a positive value.
authorShawn Routhier <sar@isc.org>
Fri, 18 Feb 2011 19:12:50 +0000 (19:12 +0000)
committerShawn Routhier <sar@isc.org>
Fri, 18 Feb 2011 19:12:50 +0000 (19:12 +0000)
[ISC-Bugs #22824]

RELNOTES
common/dlpi.c

index 70adf814428078be41e52657b3d41196784e02bf..e03e52d2c94353f7b1e7fef3af9f0d65b5afb40d 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -207,6 +207,9 @@ work on other platforms. Please report any problems and suggested fixes to
   [ISC-Bugs #22888] - Enable the ldap code when buidling common
   The above fixes are from Jiri Popelka at Red Hat.
 
+- Modify the dlpi code to accept getmsg() returning a positive value.
+  [ISC-Bugs #22824]
+
                        Changes since 4.2.0b2
 
 - Add declaration for variable in debug code in alloc.c.  [ISC-Bugs #21472]
index 002480ff647e2124ca7760114a63ac4ab020212c..4700cf51539f23b977620219fb7663d880b0a91f 100644 (file)
@@ -3,7 +3,7 @@
    Data Link Provider Interface (DLPI) network interface code. */
 
 /*
- * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009-2011 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 2004,2007 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1996-2003 by Internet Software Consortium
  *
@@ -1165,16 +1165,7 @@ static int dlpiunitdataind (fd, daddr, daddrlen,
 
        result = getmsg (fd, &ctl, &data, &flags);
 
-       /*
-        * The getmsg() manpage says:
-        *
-        * "On successful completion, a non-negative value is returned."
-        *
-        * This suggests that if MOREDATA or MORECTL are set, we error?
-        * This seems to be safe as it never seems to happen.  Still,
-        * set a log message, so we know if it ever starts happening.
-        */
-       if (result != 0) {
+       if (result < 0) {
                log_debug("dlpiunitdataind: %m");
                return -1;
        }