Use key=val pairs for additional prefix params
authorSteven Barth <steven@midlink.org>
Wed, 8 May 2013 12:39:35 +0000 (14:39 +0200)
committerSteven Barth <steven@midlink.org>
Wed, 8 May 2013 12:39:35 +0000 (14:39 +0200)
src/script.c

index a56d9b4df42c62947ec9d9c5d6b1f05668aa70da..051718f206ed2e7513fbd9808d09628a2b2d17ae 100644 (file)
@@ -164,7 +164,7 @@ static void entry_to_env(const char *name, const void *data, size_t len, enum en
 
                        if (type == ENTRY_PREFIX && e[i].priority) {
                                // priority and router are abused for prefix exclusion
-                               buf[buf_len++] = ',';
+                               buf_len += snprintf(&buf[buf_len], 12, ",excluded=");
                                inet_ntop(AF_INET6, &e[i].router, &buf[buf_len], INET6_ADDRSTRLEN);
                                buf_len += strlen(&buf[buf_len]);
                                buf_len += snprintf(&buf[buf_len], 24, "/%u", e[i].priority);