Add grouping session functionality for load balancing and failover
[l2tpns.git] / pppoe.c
diff --git a/pppoe.c b/pppoe.c
index 4b196ea..ca1c5e4 100644 (file)
--- a/pppoe.c
+++ b/pppoe.c
@@ -21,6 +21,7 @@
 #include <netpacket/packet.h>
 #include <arpa/inet.h>
 #include <linux/if_pppox.h>
+#include <linux/rtnetlink.h>
 
 #include "l2tpns.h"
 #include "cluster.h"
@@ -956,6 +957,7 @@ static void pppoe_forwardto_session_rmlns(uint8_t *pack, int size, sessionidt se
                // Update STAT OUT
                increment_counter(&session[s].cout, &session[s].cout_wrap, ll2tp); // byte count
                session[s].cout_delta += ll2tp;
+               session[s].coutgrp_delta += ll2tp;
                session[s].pout++;
                sess_local[s].cout += ll2tp;
                sess_local[s].pout++;
@@ -1027,6 +1029,7 @@ void pppoe_forwardto_session_pppoe(uint8_t *pack, int size, sessionidt sess, uin
                // Update STAT OUT
                increment_counter(&session[s].cout, &session[s].cout_wrap, lpppoe); // byte count
                session[s].cout_delta += lpppoe;
+               session[s].coutgrp_delta += lpppoe;
                session[s].pout++;
                sess_local[s].cout += lpppoe;
                sess_local[s].pout++;