From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id E61B95A004F for ; Tue, 13 Aug 2024 21:20:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723576803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iP5+AqbY6UdjyWOyIgBjG/snNOatmr2bn0Z67wvXdls=; b=bdYpGG/2YDh4P4+SuVbdtbTtLe7b88OVpArf1y/xL2MmpN+cH7upgdGx4IrghkhvEvmSCK ETu0yoO50eB94/SMPh7j5CsisEILqElq2kNd36M3qqDkZBajVfKfHPvEC22+ki6eR9P3nm B29UZb7WZvzBi0az+vHD2Xg9+h55Vj0= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-658-K9cCs51INnuSOeoeLrICcw-1; Tue, 13 Aug 2024 15:20:01 -0400 X-MC-Unique: K9cCs51INnuSOeoeLrICcw-1 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-1fca868b53cso47431625ad.1 for ; Tue, 13 Aug 2024 12:20:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723576801; x=1724181601; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iP5+AqbY6UdjyWOyIgBjG/snNOatmr2bn0Z67wvXdls=; b=AVzRMpJLd4YOUU8IBEmVovN4tdyf/AQQ444LSai2T5KAMce99UAWWTSVTV4LjIq6uz +FC1hpMgAYCvDAhap07Htl5G32JtRYbiBOUzUlWfnX1eKJfUs8nt5k63PDKWyKAprAYE yxIgU1CbVOMv8afv52HUXZWz8xfv34UtAx3+9KshnGKcZJZpIf7gec/+9S+ea6SKwNDL LpG/4yBYScCFtEmc+FrVRfF6o2XXivwlDlXB23XyqGSOMg9U5WGL1a1rSIZh+QNEQQsw g8/4/OJHsWdtTcakqrAxVMx7bHAaljOIlHJsjAswMlbktdmRLjTtJ6GSLscEuiF87FTx EqlA== X-Gm-Message-State: AOJu0YzdSWULhF0BubfNu/unEjPh9yTe3B1TcPxlrthuU2dOeLRLsEnM KNwUKeyTozqdG3AjNtvJX/F/D8RNpvQbxEIV+pLdK9LdW/TjRGtf/LLVb9xvOqvhY0lg7uIHgUO rLRTy2F7AAG9tBQFg0qaZKLrNQA5k/voeJiImZxP3hfwbj8umCw== X-Received: by 2002:a17:903:11d1:b0:1ff:4568:652f with SMTP id d9443c01a7336-201d6397da0mr8473645ad.1.1723576800828; Tue, 13 Aug 2024 12:20:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHQbj9T1/520gyb1+FgAKjgUfNgheixEOCfRwLErViAmT+crelqM9Hd1hM2D3C+h1CBZu5Jyg== X-Received: by 2002:a17:903:11d1:b0:1ff:4568:652f with SMTP id d9443c01a7336-201d6397da0mr8473215ad.1.1723576800237; Tue, 13 Aug 2024 12:20:00 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-201cd1a9e9bsm17040695ad.126.2024.08.13.12.19.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 12:19:59 -0700 (PDT) Date: Tue, 13 Aug 2024 21:19:56 +0200 From: Stefano Brivio To: AbdAlRahman Gad Subject: Re: [PATCH v2] ndp.c: Turn NDP responder into more declarative implementation Message-ID: <20240813211956.65bb4cc3@elisabeth> In-Reply-To: <20240812193338.351810-1-abdobngad@gmail.com> References: <20240812193338.351810-1-abdobngad@gmail.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: N6RZXGQUNVD7YDXGCCPLVEZEXUYTCKAT X-Message-ID-Hash: N6RZXGQUNVD7YDXGCCPLVEZEXUYTCKAT X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, 12 Aug 2024 22:33:38 +0300 AbdAlRahman Gad wrote: > - Add structs for NA, RA, NS, MTU, prefix info, option header, > link-layer address, RDNSS, DNSSL and link-layer for RA message. > > - Turn NA message from purely imperative, going byte by byte, > to declarative by filling it's struct. > > - Turn part of RA message into declarative. > > - Move packet_add() to be before the call of ndp() in tap6_handler() > if the protocol of the packet is ICMPv6. > > - Add a pool of packets as an additional parameter to ndp(). > > - Check the size of NS packet with packet_get() before sending an NA > packet. > > - Add documentation for the structs. > > - Add an enum for NDP option types. > > Link: https://bugs.passt.top/show_bug.cgi?id=21 > > Signed-off-by: AbdAlRahman Gad Applied, thanks! I also closed https://bugs.passt.top/show_bug.cgi?id=21 as resolved. -- Stefano