diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-01-13 11:47:42 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-01-13 11:47:42 +0100 |
commit | 0590256080feb5e8f8742938efa539f2aec90601 (patch) | |
tree | 933ba6f741d4e4b667afc912b7503e723deaad6a | |
parent | 1a8612c18833b3ee9ff07b28533408f2e45fddfd (diff) |
fix local/remote port env vars
-rw-r--r-- | proc.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -147,7 +147,9 @@ struct env_var *uh_get_process_vars(struct client *cl, struct path_info *pi) snprintf(redirect_status, sizeof(redirect_status), "%d", req->redirect_status); inet_ntop(cl->srv_addr.family, &cl->srv_addr.in, local_addr, sizeof(local_addr)); + snprintf(local_port, sizeof(local_port), "%d", cl->srv_addr.port); inet_ntop(cl->peer_addr.family, &cl->peer_addr.in, remote_addr, sizeof(remote_addr)); + snprintf(remote_port, sizeof(remote_port), "%d", cl->peer_addr.port); blobmsg_parse(hdr_policy, __HDR_MAX, tb, blob_data(data), blob_len(data)); for (i = 0; i < ARRAY_SIZE(proc_header_env); i++) { |