Commit Diff
Diff:
6a317355af361945c1164c80ad0a3913ed177da0
f8d00260fd5c40f714f0a8a81e355944aca2f47d
Commit:
f8d00260fd5c40f714f0a8a81e355944aca2f47d
Tree:
8d035ff33f2b10643035c0517291c72f0dc30a2e
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Sat Jul 4 08:44:04 2020 UTC
Message:
fix up the forwarders names
blob - fd02f0444bbb3f911fef68015344abf0d79c60eb
blob + a4805ae9614aaaf151c6524ffa41c3c5e6767240
--- forward.c
+++ forward.c
@@ -27,7 +27,7 @@
*/
/*
- * $Id: forward.c,v 1.11 2020/07/04 08:25:28 pjp Exp $
+ * $Id: forward.c,v 1.12 2020/07/04 08:44:04 pjp Exp $
*/
#include <sys/types.h>
@@ -196,10 +196,10 @@ insert_forward(int family, struct sockaddr_storage *ip
switch (fw2->family) {
case AF_INET:
- inet_ntop(AF_INET, (struct sockaddr_in *)ip, fw2->name, sizeof(fw2->name));
+ inet_ntop(AF_INET, &((struct sockaddr_in *)ip)->sin_addr, fw2->name, sizeof(fw2->name));
break;
case AF_INET6:
- inet_ntop(AF_INET6, (struct sockaddr_in6 *)ip, fw2->name, sizeof(fw2->name));
+ inet_ntop(AF_INET6, &((struct sockaddr_in6 *)ip)->sin6_addr, fw2->name, sizeof(fw2->name));
break;
}
@@ -286,7 +286,7 @@ forwardloop(ddDB *db, struct cfg *cfg, struct imsgbuf
ddd_shutdown();
exit(1);
}
-
+
for (;;) {
/*
* due to our strategy (which kinda sucks) stir some
repomaster@centroid.eu