[hipl-dev] [Branch ~hipl-core/hipl/trunk] Rev 5975: add error handling for connection insertion by update

  • From: noreply@xxxxxxxxxxxxx
  • To: HIPL core team <hipl-dev@xxxxxxxxxxxxx>
  • Date: Fri, 24 Jun 2011 14:10:55 -0000

------------------------------------------------------------
revno: 5975
committer: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx>
branch nick: trunk
timestamp: Fri 2011-06-24 15:54:52 +0200
message:
  add error handling for connection insertion by update
modified:
  firewall/conntrack.c


--
lp:hipl
https://code.launchpad.net/~hipl-core/hipl/trunk

Your team HIPL core team is subscribed to branch lp:hipl.
To unsubscribe from this branch go to 
https://code.launchpad.net/~hipl-core/hipl/trunk/+edit-subscription
=== modified file 'firewall/conntrack.c'
--- firewall/conntrack.c        2011-06-24 13:53:09 +0000
+++ firewall/conntrack.c        2011-06-24 13:54:52 +0000
@@ -1529,12 +1529,16 @@
                 goto out_err;
             }
 
-            /* insertion successful -> go on */
+            free(data);
+
             tuple = get_tuple_by_hits(&common->hits, &common->hitr);
-
-            HIP_DEBUG("connection insertion successful\n");
-
-            free(data);
+            if (tuple) {
+                HIP_DEBUG("connection insertion successful\n");
+            } else {
+                HIP_ERROR("failed to insert new connection\n");
+                err = 0;
+                goto out_err;
+            }
         } else {
             /* unknown connection, but insufficient parameters to set up state 
*/
             HIP_DEBUG("insufficient parameters to create new connection with 
UPDATE\n");

Other related posts:

  • » [hipl-dev] [Branch ~hipl-core/hipl/trunk] Rev 5975: add error handling for connection insertion by update - noreply