output prefix IAID as prefix class in script
authorKaspar Schleiser <kaspar@schleiser.de>
Fri, 24 Jan 2014 13:15:12 +0000 (14:15 +0100)
committerSteven Barth <steven@midlink.org>
Mon, 27 Jan 2014 13:16:44 +0000 (14:16 +0100)
Contributed by T-Labs, Deutsche Telekom Innovation Laboratories

src/script.c

index 5a021dff5a2297b44978572f975e5909ad0748fb..3041fe73097b558080466f71fc3c3a4a7821e48b 100644 (file)
@@ -190,6 +190,8 @@ static void entry_to_env(const char *name, const void *data, size_t len, enum en
 
                        if ((type == ENTRY_PREFIX || type == ENTRY_ADDRESS) && e[i].class)
                                buf_len += snprintf(&buf[buf_len], 12, ",class=%u", e[i].class);
+                       else if (type == ENTRY_PREFIX)
+                               buf_len += snprintf(&buf[buf_len], 16, ",class=%08x", ntohl(e[i].iaid));
 
                        if (type == ENTRY_PREFIX && e[i].priority) {
                                // priority and router are abused for prefix exclusion