Commit 06a36e3c authored by Leigh B. Stoller's avatar Leigh B. Stoller

Bump version to 19. Earlier images will get static routes returned

from the DB when the routertype is "static" since those images are
likely to not have ddijk support on them. Newer images will have
ddijk, and so will compute the routes themselves; do not send them
back. Note that static-old implies that nodes will get the routes no
matter what, although old images will probably barf if gets that; I
don't view this as a problem since very people are going to request
static-old.
parent c0818bff
......@@ -47,7 +47,7 @@ use POSIX qw(strftime);
#
# BE SURE TO BUMP THIS AS INCOMPATIBILE CHANGES TO TMCD ARE MADE!
#
sub TMCD_VERSION() { 18; };
sub TMCD_VERSION() { 19; };
libtmcc::configtmcc("version", TMCD_VERSION());
# Control tmcc timeout.
......
......@@ -25,4 +25,4 @@
* NB: See ron/libsetup.pm. That is version 4! I'll merge that in.
*/
#define DEFAULT_VERSION 2
#define CURRENT_VERSION 18
#define CURRENT_VERSION 19
......@@ -3126,7 +3126,7 @@ COMMAND_PROTOTYPE(dorouting)
MYSQL_RES *res;
MYSQL_ROW row;
char buf[MYBUFSIZE];
int n, nrows;
int n, nrows, isstatic = 0;
/*
* Now check reserved table
......@@ -3163,6 +3163,9 @@ COMMAND_PROTOTYPE(dorouting)
mysql_free_result(res);
return 0;
}
if (!strcmp(row[0], "static")) {
isstatic = 1;
}
OUTPUT(buf, sizeof(buf), "ROUTERTYPE=%s\n", row[0]);
mysql_free_result(res);
......@@ -3170,6 +3173,15 @@ COMMAND_PROTOTYPE(dorouting)
if (verbose)
info("ROUTES: %s", buf);
/*
* New images treat "static" as "static-ddijk", so even if there
* are routes in the DB, we do not want to return them to the node
* since that would be a waste of bandwidth.
*/
if (vers >= 19 && isstatic) {
return 0;
}
/*
* Get the routing type from the nodes table.
*/
......
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