From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Novakovic Subject: [PATCH 3/8] ipconfig: BOOTP: Don't request IEN-116 name servers Date: Sat, 7 Apr 2018 05:08:58 +0100 Message-ID: <20180407040903.8997-4-chris@chrisn.me.uk> References: <20180407040903.8997-1-chris@chrisn.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Chris Novakovic To: "David S. Miller" , netdev@vger.kernel.org Return-path: Received: from mail-wm0-f67.google.com ([74.125.82.67]:52115 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751128AbeDGEJi (ORCPT ); Sat, 7 Apr 2018 00:09:38 -0400 Received: by mail-wm0-f67.google.com with SMTP id u189so6844889wmd.1 for ; Fri, 06 Apr 2018 21:09:38 -0700 (PDT) In-Reply-To: <20180407040903.8997-1-chris@chrisn.me.uk> Sender: netdev-owner@vger.kernel.org List-ID: When ipconfig is autoconfigured via BOOTP, the request packet initialised by ic_bootp_init_ext() allocates 8 bytes for tag 5 ("Name Server" [1, §3.7]), but tag 5 in the response isn't processed by ic_do_bootp_ext(). Instead, allocate the 8 bytes to tag 6 ("Domain Name Server" [1, §3.8]), which is processed by ic_do_bootp_ext(), and appears to have been the intended tag to request. This won't cause any breakage for existing users, as tag 5 responses provided by BOOTP servers weren't being processed anyway. [1] RFC 2132, "DHCP Options and BOOTP Vendor Extensions": https://tools.ietf.org/rfc/rfc2132.txt Signed-off-by: Chris Novakovic --- net/ipv4/ipconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index d0ea0ecc9008..bcf3c4f9882d 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c @@ -721,7 +721,7 @@ static void __init ic_bootp_init_ext(u8 *e) *e++ = 3; /* Default gateway request */ *e++ = 4; e += 4; - *e++ = 5; /* Name server request */ + *e++ = 6; /* (DNS) name server request */ *e++ = 8; e += 8; *e++ = 12; /* Host name request */ -- 2.14.1