From patchwork Tue Feb 8 14:46:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1589887 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JtQnS3GZSz9sFn for ; Wed, 9 Feb 2022 01:46:36 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 40B4860DB2; Tue, 8 Feb 2022 14:46:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qiO0nTLIqEgq; Tue, 8 Feb 2022 14:46:29 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 86FA460669; Tue, 8 Feb 2022 14:46:28 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 65C71C001A; Tue, 8 Feb 2022 14:46:28 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6914AC000B for ; Tue, 8 Feb 2022 14:46:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 575634059B for ; Tue, 8 Feb 2022 14:46:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2nW4Jz-fSFcr for ; Tue, 8 Feb 2022 14:46:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by smtp2.osuosl.org (Postfix) with ESMTPS id 23FCC4015E for ; Tue, 8 Feb 2022 14:46:25 +0000 (UTC) Received: (Authenticated sender: numans@ovn.org) by mail.gandi.net (Postfix) with ESMTPSA id 5DBCFE000B; Tue, 8 Feb 2022 14:46:22 +0000 (UTC) From: numans@ovn.org To: dev@openvswitch.org Date: Tue, 8 Feb 2022 09:46:11 -0500 Message-Id: <20220208144611.947066-1-numans@ovn.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Cc: Sven Haardiek Subject: [ovs-dev] [PATCH ovn] Set additional header in DNS message explicitly X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: Sven Haardiek Some DNS Queries include an optional RR in the additional record section of DNS, so simply copying the non-zero DNS Header for the additional records, but not adding any leads to broken DNS packages. This patch explicitly sets the additional records entry in the DNS header to 0. Closes #114 Submitted-at: https://github.com/ovn-org/ovn/pull/115 Signed-off-by: Sven Haardiek --- controller/pinctrl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controller/pinctrl.c b/controller/pinctrl.c index 293aecea2..fd0bccdb6 100644 --- a/controller/pinctrl.c +++ b/controller/pinctrl.c @@ -3023,8 +3023,9 @@ pinctrl_handle_dns_lookup( /* Set the response bit to 1 in the flags. */ out_dns_header->lo_flag |= 0x80; - /* Set the answer RR. */ + /* Set the answer RRs. */ out_dns_header->ancount = htons(ancount); + out_dns_header->arcount = 0; /* Copy the Query section. */ dp_packet_put(&pkt_out, dp_packet_data(pkt_in), dp_packet_size(pkt_in));