From fd95ed5604dbee3972e479c5cf85c2afd52ebdd9 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Wed, 8 Oct 2014 15:02:27 +0200 Subject: [PATCH] script: don't leak IA_PD / IA_NA if not yet bound --- src/script.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/script.c b/src/script.c index 644f61f..98fc6e9 100644 --- a/src/script.c +++ b/src/script.c @@ -378,8 +378,12 @@ void script_call(const char *status) s46_to_env(STATE_S46_MAPT, s46_mapt, s46_mapt_len); s46_to_env(STATE_S46_LW, s46_lw, s46_lw_len); bin_to_env(custom, custom_len); - entry_to_env("PREFIXES", prefix, prefix_len, ENTRY_PREFIX); - entry_to_env("ADDRESSES", address, address_len, ENTRY_ADDRESS); + + if (odhcp6c_is_bound()) { + entry_to_env("PREFIXES", prefix, prefix_len, ENTRY_PREFIX); + entry_to_env("ADDRESSES", address, address_len, ENTRY_ADDRESS); + } + entry_to_env("RA_ADDRESSES", ra_pref, ra_pref_len, ENTRY_ADDRESS); entry_to_env("RA_ROUTES", ra_route, ra_route_len, ENTRY_ROUTE); entry_to_env("RA_DNS", ra_dns, ra_dns_len, ENTRY_HOST); -- 2.25.1