diff options
| author | David Sommerseth <dazo@users.sourceforge.net> | 2012-09-13 17:56:45 +0200 |
|---|---|---|
| committer | David Sommerseth <dazo@users.sourceforge.net> | 2012-09-13 17:56:45 +0200 |
| commit | 2ebf7e3a91fee5663ead92474ec6fca7908cb78d (patch) | |
| tree | 49d58c7de130ac46e349883e9bda2a3cadbd5863 /database/sqlite/sql-schema.sql | |
| parent | 4ed91be8670a0d0760bbaf23f7b5a6a16eac30ad (diff) | |
| download | eurephia-2ebf7e3a91fee5663ead92474ec6fca7908cb78d.tar.gz eurephia-2ebf7e3a91fee5663ead92474ec6fca7908cb78d.tar.xz eurephia-2ebf7e3a91fee5663ead92474ec6fca7908cb78d.zip | |
sqlite3: Implement eDBregister_vpnclientaddr()
This commit implements the eDBregister_vpnclientaddr() needed by the
newer eurephia-auth plug-in. This is needed to improve the tun support
in eurephia.
In addition, this also updates the SQL schema to include IPv4 and in
the future IPv6 addresses in the lastlog and VPN address history
(openvpn_vpnaddr_history). The old openvpn_macaddr_history table
is deprecated.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'database/sqlite/sql-schema.sql')
| -rw-r--r-- | database/sqlite/sql-schema.sql | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/database/sqlite/sql-schema.sql b/database/sqlite/sql-schema.sql index 581aaac..6d2befb 100644 --- a/database/sqlite/sql-schema.sql +++ b/database/sqlite/sql-schema.sql @@ -1,7 +1,7 @@ -- -- eurephia database schema for SQLite3 -- --- GPLv2 only - Copyright (C) 2008 - 2010 +-- GPLv2 only - Copyright (C) 2008 - 2012 -- David Sommerseth <dazo@users.sourceforge.net> -- -- This program is free software; you can redistribute it and/or @@ -72,6 +72,7 @@ CREATE TABLE openvpn_lastlog ( macaddr varchar(20) , vpnipaddr varchar(32) NOT NULL, vpnipmask varchar(32) NOT NULL, + vpnipv6addr varchar(48) , sessionstatus integer NOT NULL DEFAULT 0, sessionkey varchar(128) , login timestamp , @@ -84,16 +85,18 @@ CREATE TABLE openvpn_lastlog ( ); CREATE UNIQUE INDEX openvpn_lastlog_sessionkey ON openvpn_lastlog(sessionkey); --- openvpn_macaddr_history - This keeps an overview over which MAC addresses a session --- have used, in case the client changes the MAC address. -CREATE TABLE openvpn_macaddr_history ( +-- openvpn_vpnaddr_history - This keeps an overview over which VPN client addresses +-- a session have used, in case the client changes the address. +CREATE TABLE openvpn_vpnaddr_history ( sessionkey varchar(64) NOT NULL, macaddr varchar(20) NOT NULL, + ip4addr varchar(32) , + ip6addr varchar(48) , 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 INDEX openvpn_vpnaddr_hist_sessionkey ON openvpn_vpnaddr_history(sessionkey); +CREATE INDEX openvpn_vpnaddr_hist_macaddr ON openvpn_vpnaddr_history(macaddr); -- openvpn_sessions - A little storage of variables needed by eurephia to keep track -- of all the sessions |
