Skip to content

Commit

Permalink
ipconfig: BOOTP: Don't request IEN-116 name servers
Browse files Browse the repository at this point in the history
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 <chris@chrisn.me.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Chris Novakovic authored and David S. Miller committed Apr 24, 2018
1 parent e18bdc8 commit 4e1a8af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/ipconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 4e1a8af

Please sign in to comment.