Add grouping session functionality for load balancing and failover
[l2tpns.git] / l2tplac.c
index 6ad4683..442f08a 100644 (file)
--- a/l2tplac.c
+++ b/l2tplac.c
@@ -7,6 +7,8 @@
 
 #include <errno.h>
 #include <string.h>
+#include <sys/socket.h>
+#include <linux/rtnetlink.h>
 
 #include "md5.h"
 #include "l2tpns.h"
@@ -525,6 +527,7 @@ int lac_session_forward(uint8_t *buf, int len, sessionidt sess, uint16_t proto,
                // Update STAT OUT
                increment_counter(&session[s].cout, &session[s].cout_wrap, len); // byte count
                session[s].cout_delta += len;
+               session[s].coutgrp_delta += len;
                session[s].pout++;
                sess_local[s].cout += len;
                sess_local[s].pout++;