Commit 120b87c2 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add netmask to various tables. Currently in text format, but might

have to change to an int format to save space. I'll probably make some
changes to the migrate code later, but I want to get the DB changes
checked in.
parent 9ed2d1e0
......@@ -449,6 +449,7 @@ CREATE TABLE interfaces (
IP varchar(15) default NULL,
IPalias varchar(15) default NULL,
IPaliases text,
mask varchar(15) default '255.255.255.0',
interface_type varchar(30) default NULL,
iface text NOT NULL,
role enum('ctrl','expt','jail','fake','other') NOT NULL default 'other',
......@@ -1240,6 +1241,7 @@ CREATE TABLE tunnels (
isserver tinyint(3) unsigned NOT NULL default '0',
port int(11) NOT NULL default '0',
peer_ip varchar(32) NOT NULL default '',
mask varchar(15) default NULL,
password varchar(32) NOT NULL default '',
proto varchar(12) NOT NULL default 'udp',
encrypt tinyint(3) unsigned NOT NULL default '0',
......@@ -1396,6 +1398,7 @@ CREATE TABLE veth_interfaces (
veth_id int(10) unsigned NOT NULL auto_increment,
mac varchar(12) NOT NULL default '000000000000',
IP varchar(15) default NULL,
mask varchar(15) default NULL,
iface varchar(10) default NULL,
vnode_id varchar(32) default NULL,
PRIMARY KEY (node_id,veth_id),
......@@ -1440,6 +1443,7 @@ CREATE TABLE virt_lans (
q_red tinyint(4) default '0',
q_gentle tinyint(4) default '0',
member text,
mask varchar(15) default '255.255.255.0',
rdelay float(10,2) default NULL,
rbandwidth int(10) unsigned default NULL,
rlossrate float(10,3) default NULL,
......
......@@ -896,3 +896,20 @@ last_net_act,last_cpu_act,last_ext_act);
update interfaces set role='fake' where \
(interface_type='ixp_fake' and node_id like 'pc%');
1.176: Add netmask to various tables. Currently in text format, but
might have to change to an int format to save space.
alter table interfaces add mask varchar(15) \
default NULL after IPaliases;
alter table virt_lans add mask varchar(15) \
default '255.255.255.0' after member;
alter table tunnels add mask varchar(15) \
default NULL after peer_ip;
alter table veth_interfaces add mask varchar(15) \
default NULL after IP;
update interfaces set mask='255.255.255.0' \
where role='ctrl' or role='ctrl' or role='fake';
update veth_interfaces set mask='255.255.255.0';
update tunnels set mask='255.255.255.0';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment