summaryrefslogtreecommitdiffstats
path: root/nest
diff options
context:
space:
mode:
Diffstat (limited to 'nest')
-rw-r--r--nest/config.Y13
-rw-r--r--nest/iface.c4
2 files changed, 13 insertions, 4 deletions
diff --git a/nest/config.Y b/nest/config.Y
index 0c65321..dfef4e2 100644
--- a/nest/config.Y
+++ b/nest/config.Y
@@ -20,7 +20,7 @@ CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE, DISABLED, DEBUG, ALL, OFF, DIRECT)
CF_KEYWORDS(INTERFACE, IMPORT, EXPORT, FILTER, NONE, TABLE)
CF_KEYWORDS(PASSWORD, FROM, PASSIVE, TO, ID)
-%type <i> idval
+%type <i32> idval
%type <f> imexport
%type <r> rtable
%type <p> password_list password_begin
@@ -37,8 +37,15 @@ rtrid: ROUTER ID idval ';' {
;
idval:
- NUM
- | IPA { $$ = ipa_to_u32($1); }
+ NUM { $$ = $1; }
+ | RTRID
+ | IPA {
+#ifndef IPV6
+ $$ = ipa_to_u32($1);
+#else
+ cf_error("Router IDs must be entered as hexadecimal numbers in IPv6 version");
+#endif
+ }
;
/* Creation of routing tables */
diff --git a/nest/iface.c b/nest/iface.c
index 3a5d9c6..debec45 100644
--- a/nest/iface.c
+++ b/nest/iface.c
@@ -549,8 +549,9 @@ ifa_delete(struct ifa *a)
}
static void
-auto_router_id(void) /* FIXME: What if we run IPv6??? */
+auto_router_id(void)
{
+#ifndef IPV6
struct iface *i, *j;
j = NULL;
@@ -564,6 +565,7 @@ auto_router_id(void) /* FIXME: What if we run IPv6??? */
die("Cannot determine router ID (no suitable network interface found), please configure it manually");
debug("Guessed router ID %I (%s)\n", j->addr->ip, j->name);
config->router_id = ipa_to_u32(j->addr->ip);
+#endif
}
void