diff options
| -rw-r--r-- | pkg/nsd/patch/0004-Avoid-unnecessary-VLA.patch | 30 | ||||
| -rw-r--r-- | pkg/nsd/ver | 2 |
2 files changed, 13 insertions, 19 deletions
diff --git a/pkg/nsd/patch/0004-Avoid-unnecessary-VLA.patch b/pkg/nsd/patch/0004-Avoid-unnecessary-VLA.patch index 3de505ce..9be7c002 100644 --- a/pkg/nsd/patch/0004-Avoid-unnecessary-VLA.patch +++ b/pkg/nsd/patch/0004-Avoid-unnecessary-VLA.patch @@ -1,34 +1,28 @@ -From badd4b57dee6c34643a2b79b682956c56c33bc36 Mon Sep 17 00:00:00 2001 +From 3dbfc38645c53c2bf9b5f54635a2fa65ddaeab88 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sun, 16 Jun 2019 23:37:11 -0700 Subject: [PATCH] Avoid unnecessary VLA +Upstream: https://github.com/NLnetLabs/nsd/pull/60 --- - xfrd-tcp.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + xfrd-tcp.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xfrd-tcp.c b/xfrd-tcp.c -index 3c176a38..a4d795c7 100644 +index 1ae5311c..d00c13b7 100644 --- a/xfrd-tcp.c +++ b/xfrd-tcp.c -@@ -214,12 +214,12 @@ pipeline_find(struct xfrd_tcp_set* set, xfrd_zone_type* zone) - struct xfrd_tcp_pipeline* r; +@@ -215,8 +215,8 @@ pipeline_find(struct xfrd_tcp_set* set, xfrd_zone_type* zone) /* smaller buf than a full pipeline with 64kb ID array, only need * the front part with the key info, this front part contains the -- * members that the compare function uses. */ + * members that the compare function uses. */ - const size_t keysize = sizeof(struct xfrd_tcp_pipeline) - - ID_PIPE_NUM*(sizeof(struct xfrd_zone*) + sizeof(uint16_t)); -- /* void* type for alignment of the struct, -+ * members that the compare function uses. -+ * -+ * void* type for alignment of the struct, ++ enum { keysize = sizeof(struct xfrd_tcp_pipeline) - ++ ID_PIPE_NUM*(sizeof(struct xfrd_zone*) + sizeof(uint16_t)) }; + /* void* type for alignment of the struct, * divide the keysize by ptr-size and then add one to round up */ -- void* buf[ (keysize / sizeof(void*)) + 1 ]; -+ void* buf[ ((sizeof(struct xfrd_tcp_pipeline) - -+ ID_PIPE_NUM*(sizeof(struct xfrd_zone*) + sizeof(uint16_t))) / sizeof(void*)) + 1 ]; - struct xfrd_tcp_pipeline* key = (struct xfrd_tcp_pipeline*)buf; - key->node.key = key; - key->ip_len = xfrd_acl_sockaddr_to(zone->master, &key->ip); + void* buf[ (keysize / sizeof(void*)) + 1 ]; -- -2.20.1 +2.25.0 diff --git a/pkg/nsd/ver b/pkg/nsd/ver index 2f5517d7..977ed5fc 100644 --- a/pkg/nsd/ver +++ b/pkg/nsd/ver @@ -1 +1 @@ -4.2.4 r0 +4.2.4 r1 |
