IPComp for IKEv2

This commit is contained in:
Tobias Brunner
2008-05-08 16:19:11 +00:00
parent 0f074a4344
commit d4aad55434
15 changed files with 452 additions and 56 deletions
+1
View File
@@ -22,6 +22,7 @@ CREATE TABLE `child_configs` (
`mode` tinyint(4) unsigned NOT NULL default '1',
`dpd_action` tinyint(4) unsigned NOT NULL default '0',
`close_action` tinyint(4) unsigned NOT NULL default '0',
`ipcomp` tinyint(4) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
INDEX (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+4 -4
View File
@@ -125,15 +125,15 @@ static void add_traffic_selectors(private_sql_config_t *this,
*/
static child_cfg_t *build_child_cfg(private_sql_config_t *this, enumerator_t *e)
{
int id, lifetime, rekeytime, jitter, hostaccess, mode, dpd, close;
int id, lifetime, rekeytime, jitter, hostaccess, mode, dpd, close, ipcomp;
char *name, *updown;
child_cfg_t *child_cfg;
if (e->enumerate(e, &id, &name, &lifetime, &rekeytime, &jitter,
&updown, &hostaccess, &mode, &dpd, &close))
&updown, &hostaccess, &mode, &dpd, &close, &ipcomp))
{
child_cfg = child_cfg_create(name, lifetime, rekeytime, jitter,
updown, hostaccess, mode, dpd, close);
updown, hostaccess, mode, dpd, close, ipcomp);
/* TODO: read proposal from db */
child_cfg->add_proposal(child_cfg, proposal_create_default(PROTO_ESP));
add_traffic_selectors(this, child_cfg, id);
@@ -152,7 +152,7 @@ static void add_child_cfgs(private_sql_config_t *this, peer_cfg_t *peer, int id)
e = this->db->query(this->db,
"SELECT id, name, lifetime, rekeytime, jitter, "
"updown, hostaccess, mode, dpd_action, close_action "
"updown, hostaccess, mode, dpd_action, close_action, ipcomp "
"FROM child_configs JOIN peer_config_child_config ON id = child_cfg "
"WHERE peer_cfg = ?",
DB_INT, id,
+2 -1
View File
@@ -20,7 +20,8 @@ CREATE TABLE child_configs (
hostaccess INTEGER NOT NULL DEFAULT '0',
mode INTEGER NOT NULL DEFAULT '1',
dpd_action INTEGER NOT NULL DEFAULT '0',
close_action INTEGER NOT NULL DEFAULT '0'
close_action INTEGER NOT NULL DEFAULT '0',
ipcomp INTEGER NOT NULL DEFAULT '0'
);
DROP INDEX IF EXISTS child_configs_name;
CREATE INDEX child_configs_name ON child_configs (