X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/blobdiff_plain/9cda68ab3974b1f2c08a5896929890bf4a973e9a..91ac51aa6d078ba287972988fc9cca6593bfbe8f:/svc/watch.in diff --git a/svc/watch.in b/svc/watch.in index 140f1fce..5917c79e 100644 --- a/svc/watch.in +++ b/svc/watch.in @@ -577,15 +577,15 @@ def encode_envvars(env, prefix, vars): env[prefix + r_bad.sub('_', k.upper())] = v r_bad = RX.compile(r'[\W_]+') -def envvars(info): +def envvars(peer, info): """ - Translate the database INFO dictionary for a peer into a dictionary of + Translate the database INFO dictionary for a PEER into a dictionary of environment variables with plausible upper-case names and a P_ prefix. Also collect the crypto information into A_ variables. """ env = {} encode_envvars(env, 'P_', info) - encode_envvars(env, 'A_', S.algs()) + encode_envvars(env, 'A_', S.algs(peer)) return env def ifupdown(what, peer, info, *args): @@ -602,7 +602,7 @@ def ifupdown(what, peer, info, *args): c = Command([what, peer], q, what, M.split(info[what], quotep = True)[0] + [peer] + list(args), - envvars(info)) + envvars(peer, info)) potwatch(what, peer, q) def addpeer(info, peer, ifname, *addr):