From patchwork Sat Aug 6 05:00:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 1664220 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=DjkLx/Dw; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=bObG0liS; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::b3e; helo=mail-yb1-xb3e.google.com; envelope-from=swupdate+bncbcl4hcw73qcbb2xkw6lqmgqeaiz24ri@googlegroups.com; receiver=) Received: from mail-yb1-xb3e.google.com (mail-yb1-xb3e.google.com [IPv6:2607:f8b0:4864:20::b3e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M09Jb51mkz9s07 for ; Sat, 6 Aug 2022 15:00:29 +1000 (AEST) Received: by mail-yb1-xb3e.google.com with SMTP id k16-20020a252410000000b006718984ef63sf3630100ybk.3 for ; Fri, 05 Aug 2022 22:00:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1659762027; cv=pass; d=google.com; s=arc-20160816; b=BeNbiJdbvpnR70p/IWBso+F878DjViZhyaIjVdoJoxMZbP9ZTgEzXmZ+qB53/mXIQh wc2ztooWgQo2zDJdkevcSPRbX5Js1Vu1BQILM36/a6fCc3FumFojJcWf1YKDA4Z1P10U POZ2E86l+R1dqlyc1XTGa6K0XIhrbt8tF5rb3C1Vow0f3uOJE8WzQ3LxwZ47El27F+yO +IGcP+v04hh/uJNnpCUgFpoYgAdz6ZrK+oHXBmhXu37X4eVTz+kT9LrRo5b8Y4DsgwDB CngO1VTRP48ZVYmxxv1odejPB387uzbE5oczG6dneB12JSKtMIjHb1P6rEbZlZA9jJfF lDmQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature:dkim-signature; bh=p2cF4LrUHa6x8x5RqgULdIkrcIHLZeWcvATj5dOMHVc=; b=Bg2k/1kLTz978WE2xsEmxDFcu3gf3xZX/kJPncUbA+XiH87OQHca02E5gdkauyow3A NB5Tq5y9izHi0HQmegn0FBG0nqYmqk5RycMB+ZUQLiFqbmlKsHUpPpgVVbzXaNdf3t9f gzJZ/xwGvyuYTFdAYNyM9F29tb5DXXlHm9pDHYhdS6t0NJoMZlvnDQoz4LrWR98zUOqZ 7DAxGUxqwZdbqH0AKWuW4nSnG8TIZkwoTxYF6MtYtNI9ON1sQs6gf1QHBvLpq69WBzht X9uW5A0uVrgG5hPmmZfqYe4Q1Ddqbh6u/cEWGccSPvE/u4euoaaEyiLzDfAg+QB2aTOb UXfg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ibeTow9M; spf=pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d2b as permitted sender) smtp.mailfrom=james.hilliard1@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :sender:from:to:cc; bh=p2cF4LrUHa6x8x5RqgULdIkrcIHLZeWcvATj5dOMHVc=; b=DjkLx/Dw6Ze1OpJZpNFN+NI6CjO+jBd3K2WVtqd3z3pEWZtz1nlGtVBaKlbxwlMTO1 QlcepEvnywP9DDDDk6mY1kBZ+NJ4bW+5qnK+Hzn/wr+hKrxnEAufAAiAr9joMSK5X20P xF+s6KOyMl5xrikeV4SYGBsYDMWz/uPOXVfrMPEnBU+Xg74fX+lxs+UJQJYDISP2XLi8 JqJKjbDaKfsPMTxiCfM00BX3ZCDoCymEW+JpxNGAVRkwFy0yGdR04TVfLfnzr2Be4BsF OTgco59umXYAk73n10cd4xCC5jAYuSc27gxKOtm+yjjhvf+beqP5HYVS6qAe9SL5IR28 cN9g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc; bh=p2cF4LrUHa6x8x5RqgULdIkrcIHLZeWcvATj5dOMHVc=; b=bObG0liS0Z3PpFrde64+u7LUJudr5iJApHKR5TaBx2Z1f64A0kk0JaaycndisJjF7B nLwfAy7V4zED4RxZopz9nOVGr5GrPuZzPB4+rlFSi2ZGE/45WBNRqo6hbf2OU+/DV7LL fwQIo20onzZWVTlQOaSBU2Ismxir2YOOqxOHoAlKbBYRvUgPPC3fG2XU25h1qai5WQv2 bX55Oib3c2uE9EzPkXpZ+f7lph0dtNSyGQ0qkA9gvVY7FL9BmN72MheeuLEbAIMfsbb+ OOWb4riIQDAtKRqNswlnCeFLcESc7pcsKwwkJ3HDbBU9+N8sqdNcsAy/YbRXS16JgfAK 8tFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-message-state:sender:from :to:cc; bh=p2cF4LrUHa6x8x5RqgULdIkrcIHLZeWcvATj5dOMHVc=; b=NwPfD+U/3/RH6Vsi7ds6RC8BK7sapGGxbm/A7/1UG6/YHrkR5zrcjDVDJcFP/Qs8ru amCzkkomKlXAGcA2Q6gI4b+lt9ko/L7klirqfM887cUJG+CIZJJSUcEvaS5BNcGG4w3i 4ja5YOufiAGiv6MNR9K3amozccY3/r7Ropo6PMsplD2SO5mAyW93nElr8zu9BcTo1yNC hV1aNtUPUA/D4MB0SeZ4/Yz/iR6eqecnuG5NGK7ENlIaxpaY45a89uyEYaqcHZxLEB6v tFTNQZCX/xA+ruj9WKyna9J4FZTFN+CiBFOplHPlfcRhnMUlVv8peTJ/qoBR6l+oWx9l XGwg== Sender: swupdate@googlegroups.com X-Gm-Message-State: ACgBeo0TRN3ay1lDAL/pfIClLsgvOx5io1UvDz4ClEIv7qVJa5IzAasi Mv5KppWR5bNqEpqt888hDss= X-Google-Smtp-Source: AA6agR7VeQwH3M8LXc7U+1tX/unVg/TUbD69ZWueJSG/JkQxI5m/YDbpgz19mmGhiEi0rsuyC6sFkw== X-Received: by 2002:a25:2d21:0:b0:67a:5a14:9939 with SMTP id t33-20020a252d21000000b0067a5a149939mr8260555ybt.393.1659762027055; Fri, 05 Aug 2022 22:00:27 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:690c:15:b0:328:dce9:5cf4 with SMTP id bc21-20020a05690c001500b00328dce95cf4ls2982052ywb.8.-pod-prod-gmail; Fri, 05 Aug 2022 22:00:26 -0700 (PDT) X-Received: by 2002:a81:e03:0:b0:31f:4e64:3e9e with SMTP id 3-20020a810e03000000b0031f4e643e9emr9276150ywo.128.1659762026265; Fri, 05 Aug 2022 22:00:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659762026; cv=none; d=google.com; s=arc-20160816; b=BbxJeuiyGmQG/zOZNbWAq4qZrbGqmGn1E+tK3DODvZaUPdFeuUdbrgJgJuS/FAuhKP QIJsmi0ZeQVBXGe5MCdKLMVuhl3oUig0mk+znNfz+z+2/A3jZ2+OqocfqFQMS+j5kioX Au2PYJZZQZCJUHPcCo+tuGH/W6/ggXclKZfSZoWrVGJj5J6yxeq+np2QxoJbd2XpiiV7 D1ndR7DyyCEH7oIVw7zGytls1zsgSMGdHgaSdYer27D0zJT5YuuczOdnD+4nAqt2On7l UbtoUs26AFRft/auqEGpI7v+k28ct0FAg0r2+o0XuDsAkySme7n+2pNAmfe8Zr0Nlcaw S1OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=dFlUIlDLz0bs0UGtaRGB0m2lwAHUujkS+oFhoKYSFAU=; b=Fd4oDoMz3EWiXhEmDOPLhhZR44exAN3qWUBAZDanf1IiQVr/JDWkh+WaWx7l46zbnG sC/KTeJWUEHaznecPWW3CvRr347l08UF+ruxBLS+reVjpbsPueS/ByvkEdc5IvhaXVbq rpBGz+/jkWV96nc2jI7C2dLyfwFBfGNk10GR4hyLmoB/hp/e3OuG1aJtIPWRwdBKbk9A xlvwinV31Z2rri21B89csN7+ybQXQcCdLHqxE4wDqs8pudiK/v5SxUymZp1Y/PBIZF9R bfUmsqldcWD3fLqy3fVJCvQ/PBVO4WMwS43ggZXscLtRa84CFEj+dDXSVCX2iaRG9GDm IumQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ibeTow9M; spf=pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d2b as permitted sender) smtp.mailfrom=james.hilliard1@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com. [2607:f8b0:4864:20::d2b]) by gmr-mx.google.com with ESMTPS id r198-20020a0de8cf000000b00326d475396csi562882ywe.0.2022.08.05.22.00.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Aug 2022 22:00:26 -0700 (PDT) Received-SPF: pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d2b as permitted sender) client-ip=2607:f8b0:4864:20::d2b; Received: by mail-io1-xd2b.google.com with SMTP id e69so3272294iof.5 for ; Fri, 05 Aug 2022 22:00:26 -0700 (PDT) X-Received: by 2002:a6b:310b:0:b0:680:808c:508b with SMTP id j11-20020a6b310b000000b00680808c508bmr4094123ioa.75.1659762025308; Fri, 05 Aug 2022 22:00:25 -0700 (PDT) Received: from james-x399.localdomain (71-33-138-207.hlrn.qwest.net. [71.33.138.207]) by smtp.gmail.com with ESMTPSA id a27-20020a02735b000000b00341a215d3cesm2465553jae.63.2022.08.05.22.00.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 22:00:24 -0700 (PDT) From: James Hilliard To: swupdate@googlegroups.com Cc: James Hilliard Subject: [swupdate] [PATCH] network_thread: memset REQ_INSTALL ACK/NACK msg responses Date: Fri, 5 Aug 2022 23:00:21 -0600 Message-Id: <20220806050021.2257945-1-james.hilliard1@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Original-Sender: james.hilliard1@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ibeTow9M; spf=pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d2b as permitted sender) smtp.mailfrom=james.hilliard1@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , We should memset msg.data.msg when not sending a msg in the response. Signed-off-by: James Hilliard Reviewed-by: Stefano Babic --- core/network_thread.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/network_thread.c b/core/network_thread.c index 61de5e0..175cfae 100644 --- a/core/network_thread.c +++ b/core/network_thread.c @@ -553,6 +553,7 @@ void *network_thread (void *data) * Prepare answer */ msg.type = ACK; + memset(msg.data.msg, 0, sizeof(msg.data.msg)); should_close_socket = false; /* Drop all old notification from last run */ @@ -560,9 +561,10 @@ void *network_thread (void *data) /* Wake-up the installer */ pthread_cond_signal(&stream_wkup); - } else + } else { msg.type = NACK; - + memset(msg.data.msg, 0, sizeof(msg.data.msg)); + } } else { msg.type = NACK; sprintf(msg.data.msg, "Installation in progress");