From patchwork Mon Apr 1 11:53:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Dedecker X-Patchwork-Id: 1072683 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="d1czbXos"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="RrC1rgPg"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44XrNW5ww3z9sR0 for ; Mon, 1 Apr 2019 22:54:19 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=VAl+O5w5qmqg9vJtj+JRwYeXOkauuPGlAli3YrKSq6o=; b=d1czbXos2I4uBZ ZV2XZL7qwiYQEXfULaXPRdsgc+SuxW1HexqWwfJJczhwwgY3/QtzYhICPrx1Ik/hXt2xoszZowSWC 3c8w/ljhvJZh2O4urL6HDTpXJcrHBz7TiVsj7xD4dSLm9PBJc4ikaKeDYITtNjviJXnaVDnQvk8Yw GypSqOv5siU/I9rhhmWm1P7vJyrnsA9wJi2Easq2D6jInaqNt6dtU0Q8lCUzQHa1TwglXYWYlWtV4 klqbenDLgrZdVyYRSnbu0vDqVdkI6lu/qKo2c+qyAVbe3gvaIqie69Uk+ZVtwU2QZcY2aIc2H9dvN FeLCV6sakpRTjy09/86g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAvVl-0008UU-Se; Mon, 01 Apr 2019 11:53:57 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAvVj-0008TU-6Z for openwrt-devel@lists.openwrt.org; Mon, 01 Apr 2019 11:53:56 +0000 Received: by mail-wr1-x441.google.com with SMTP id w1so11659179wrp.2 for ; Mon, 01 Apr 2019 04:53:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KbNQ19r2wGow2jYr/t6ne+iH6fI09GYguvJ61t8vLzk=; b=RrC1rgPgzwEQ8mcV5HjYTs5dWXfZmErtmiJrNSsfvqwGkdcibxSsBqOdf9J5eUpjoQ 135jTs4lAoy7Bt8M0jC940+2rbqAmyT0BO5MI8yS4PxkJmZG1uSkQSvwLRCY6BfPK0Co w/MNr4vG6nnGAFwl/lDxPh4vAeUBcj/KxdDjYZYZjYB4KZogM8gqXkUFsF5pAc6KrO9E qLpCMKnbewrPkyOkqFmyGWSCWmIG9T7mLfiH7dlwji7Pi/yDEcrZ4ARhwDI2/prozEUb T70TM5PYVzcM8gi1yIUM8y5c0isYP+VCinEBJrn/vgi1FgxnVcQI5MPixHH8Hp6FhGLT sKuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KbNQ19r2wGow2jYr/t6ne+iH6fI09GYguvJ61t8vLzk=; b=NoyvQtocFcv6+wKqNM37I+pPIppi0PAT9wHq/5afv7VwxZAtH4/xd9zsRKozuT0V4w PFyc/X1oUqEWSVThDeHJYMg8BNptbE3VnRwXrZpyD5+pplKV67iGa/YFKPYaHtIRE7/o g0CfSl7NtPyIFN6HxBGOWgtaYQxXWLAl84Bm9QM33JS82dpyvlOF6oolHor1mRI+5bWH 6bwFAaIIVuzsaXiGiB7mxzgUVmfH1g09Rr76lRQje5WFe8conH/JqJBhx3e9xJ3yGRBu 6hm0yI15yOUzi/+3PH+oHWn0NR4/ulXO+cyApjc6f2XLElmidrxu2fXP+D1v5mAogHnk mP8A== X-Gm-Message-State: APjAAAXQsELlqvjCjT75CWBUzi1dcjTMNmR6FtFXkRkgdE8zAt2EJZsH SDth9QB4zktuJzI2n/8Q3nD1p2ms X-Google-Smtp-Source: APXvYqwwZdC0o2v2b62VxhOUMp+0+D4C13S7DhANYzMTFzVfvmpxfERl1OKi0siuKehIOxY7vPXafQ== X-Received: by 2002:adf:e591:: with SMTP id l17mr39017707wrm.238.1554119633140; Mon, 01 Apr 2019 04:53:53 -0700 (PDT) Received: from cplx43.eu.thmulti.com (14.125.146.82.ipv4.evonet.be. [82.146.125.14]) by smtp.gmail.com with ESMTPSA id 4sm9224461wmi.14.2019.04.01.04.53.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Apr 2019 04:53:52 -0700 (PDT) From: Hans Dedecker To: openwrt-devel@lists.openwrt.org, nbd@nbd.name Date: Mon, 1 Apr 2019 13:53:50 +0200 Message-Id: <20190401115350.9138-1-dedeckeh@gmail.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190401_045355_262550_FD36B106 X-CRM114-Status: UNSURE ( 7.69 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:441 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dedeckeh[at]gmail.com) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH v2 2/2 netifd] proto-shell: return error in case setup fails X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans Dedecker Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org In case PROTO_CMD_SETUP cannot be handled due to an invalid state; return -1 so the calling functions are aware the PROTO_CMD_SETUP has failed. Signed-off-by: Hans Dedecker --- V1 -> V2: Remove S_SETUP_ABORT, S_TEARDOWN and S_SETUP cases proto-shell.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/proto-shell.c b/proto-shell.c index 9653f4c..47a9568 100644 --- a/proto-shell.c +++ b/proto-shell.c @@ -181,11 +181,6 @@ proto_shell_handler(struct interface_proto_state *proto, state->sm = S_SETUP; break; - case S_SETUP_ABORT: - case S_TEARDOWN: - case S_SETUP: - return 0; - default: return -1; }