Commit Diff
Diff:
88e1f5170fea07586416f9ba2de5f36b99985cc7
3483358277d8c522172f7136ba5039ff96c66020
Commit:
3483358277d8c522172f7136ba5039ff96c66020
Tree:
150650b1e9083f6c8ed663debb75ebce29ac670c
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Thu Feb 28 05:03:34 2019 UTC
Message:
pack the rrlimit struct which had caused a mis-alignment issue on some platforms. From Maxim Sergeev, Thanks!
blob - 026bae64ad94ba0ca43a55836ab837a938319d40
blob + 4e3eca7761683721394c5226e6f1d00f18c34798
--- ratelimit.c
+++ ratelimit.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2018 Peter J. Philipp
+ * Copyright (c) 2014-2019 Peter J. Philipp
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
*/
/*
- * $Id: ratelimit.c,v 1.5 2018/10/19 08:24:48 pjp Exp $
+ * $Id: ratelimit.c,v 1.6 2019/02/28 05:03:34 pjp Exp $
*/
#include "ddd-include.h"
@@ -43,7 +43,7 @@ char *rrlimit_setup(int);
struct rrlimit {
u_int8_t pointer;
time_t times[256];
-};
+} __attribute__((packed));
int ratelimit = 0;
int ratelimit_packets_per_second = 6;
repomaster@centroid.eu