From 20c8541e828acd578232f9ceb65d0edd8efad5bc Mon Sep 17 00:00:00 2001
From: David Sommerseth <dazo@users.sourceforge.net>
Date: Fri, 19 Sep 2008 14:08:49 +0200
Subject: Added (untested) logging of VPN MAC addresses into
 openvpn_macaddr_history

---
 database/sqlite/sql-schema.sql | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'database/sqlite/sql-schema.sql')

diff --git a/database/sqlite/sql-schema.sql b/database/sqlite/sql-schema.sql
index a8f9168..5cdb77b 100644
--- a/database/sqlite/sql-schema.sql
+++ b/database/sqlite/sql-schema.sql
@@ -55,6 +55,15 @@ CREATE TABLE openvpn_lastlog (
 );
 CREATE UNIQUE INDEX openvpn_lastlog_sessionkey ON openvpn_lastlog(sessionkey);
 
+CREATE TABLE openvpn_macaddr_history (
+       sessionkey     varchar(64)  NOT NULL,
+       macaddr        varchar(20)  NOT NULL,
+       registered     timestamp    DEFAULT CURRENT_TIMESTAMP,
+       semaid         integer      PRIMARY KEY AUTOINCREMENT
+);
+CREATE INDEX openvpn_macaddr_hist_sessionkey ON openvpn_macaddr_history(sessionkey);
+CREATE INDEX openvpn_macaddr_hist_macaddr ON openvpn_macaddr_history(macaddr);
+
 CREATE TABLE openvpn_sessions (
        sessionkey     varchar(128) NOT NULL,
        datakey        varchar(256) NOT NULL,
-- 
cgit 

