sdhcp

simple dhcp client
git clone git://git.2f30.org/sdhcp
Log | Files | Refs | LICENSE

commit 9261d14454972ced5ae7b014b50b0f12eaad8de0
parent 466314b9bd85e738d917df0298576e28c33eaec7
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 26 Apr 2014 00:22:19 +0200

add $SERVER variable

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
Msdhcp.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/sdhcp.c b/sdhcp.c @@ -321,6 +321,8 @@ acceptlease(void) if(dflag == 1) setdns(dns); if(*program) { + snprintf(buf, sizeof(buf), "%d.%d.%d.%d", server[0], server[1], server[2], server[3]); + setenv("SERVER", buf, 1); snprintf(buf, sizeof(buf), "%d.%d.%d.%d", client[0], client[1], client[2], client[3]); setenv("CLIENT", buf, 1); snprintf(buf, sizeof(buf), "%d.%d.%d.%d", mask[0], mask[1], mask[2], mask[3]);