From 34366bc93215497eb354f889ab854e22684abf7e Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Tue, 21 May 2019 21:27:14 +0000 Subject: [PATCH] bootpd: avoid the same error indication for different issues There were several (apparently) copy-pasted NEED validation macros, leading to the same error string for different issues. Change the YP and NTP tags so they are distinct. PR: 30863 Submitted by: Dan Lukes Reviewed by: markj MFC after: 1 week Event: Waterloo Hackathon 2019 --- libexec/bootpd/dovend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libexec/bootpd/dovend.c b/libexec/bootpd/dovend.c index 3b2bd973cbf1..cb0b4a0448c4 100644 --- a/libexec/bootpd/dovend.c +++ b/libexec/bootpd/dovend.c @@ -147,7 +147,7 @@ dovend_rfc1497(hp, buf, len) if (insert_ip(TAG_NIS_SERVER, hp->nis_server, &vp, &bytesleft)) - NEED(8, "ds"); + NEED(8, "ys"); } if (hp->flags.nis_domain) { /* @@ -155,7 +155,7 @@ dovend_rfc1497(hp, buf, len) * TAG_NIS_DOMAIN and length. */ len = strlen(hp->nis_domain->string); - NEED((len + 2), "dn"); + NEED((len + 2), "yn"); *vp++ = TAG_NIS_DOMAIN; *vp++ = (byte) (len & 0xFF); bcopy(hp->nis_domain->string, vp, len); @@ -187,7 +187,7 @@ dovend_rfc1497(hp, buf, len) if (insert_ip(TAG_NTP_SERVER, hp->ntp_server, &vp, &bytesleft)) - NEED(8, "ts"); + NEED(8, "nt"); } /* * I wonder: If the hostname were "promoted" into the BOOTP