From patchwork Thu Jun 22 19:11:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murilo Opsfelder Araujo X-Patchwork-Id: 779684 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wtrxr4WZSz9s8J for ; Fri, 23 Jun 2017 05:20:00 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3wtrxr1HC6zDqkQ for ; Fri, 23 Jun 2017 05:20:00 +1000 (AEST) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3wtrxl04BfzDqjF for ; Fri, 23 Jun 2017 05:19:54 +1000 (AEST) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v5MJJ91Z042531 for ; Thu, 22 Jun 2017 15:19:52 -0400 Received: from e24smtp01.br.ibm.com (e24smtp01.br.ibm.com [32.104.18.85]) by mx0b-001b2d01.pphosted.com with ESMTP id 2b8e9r16tx-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 22 Jun 2017 15:19:51 -0400 Received: from localhost by e24smtp01.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 22 Jun 2017 16:19:49 -0300 Received: from d24relay04.br.ibm.com (9.18.232.146) by e24smtp01.br.ibm.com (10.172.0.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 22 Jun 2017 16:19:47 -0300 Received: from d24av05.br.ibm.com (d24av05.br.ibm.com [9.18.232.44]) by d24relay04.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v5MJJFx34129226 for ; Thu, 22 Jun 2017 16:19:46 -0300 Received: from d24av05.br.ibm.com (localhost [127.0.0.1]) by d24av05.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v5MGBV6H020983 for ; Thu, 22 Jun 2017 13:11:31 -0300 Received: from kermit-br-ibm-com.br.ibm.com (kermit-br-ibm-com.br.ibm.com [9.18.235.205]) by d24av05.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v5MGBVAY020966; Thu, 22 Jun 2017 13:11:31 -0300 From: Murilo Opsfelder Araujo To: slof@lists.ozlabs.org Date: Thu, 22 Jun 2017 16:11:21 -0300 X-Mailer: git-send-email 2.9.4 MIME-Version: 1.0 X-TM-AS-MML: disable x-cbid: 17062219-1523-0000-0000-000002ADC070 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17062219-1524-0000-0000-00002A45E903 Message-Id: <20170622191121.25959-1-muriloo@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-06-22_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706220330 Subject: [SLOF] [PATCH] libnet/Makefile: Define DHCPARCH in CFLAGS X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" Some applications, e.g. https://maas.io/, trust on the dhcp code 93 option to reply the correct pxelinux.0 file according to client architecture. Today, dhcp.c is compiled without DHCPARCH, which causes it not to send client architecture in the dhcp request, i.e. dhcpd server can reply a pxelinux.0 binary that is not intended for client architecture. This patch makes sure client architecture is sent in the dhcp request. Signed-off-by: Murilo Opsfelder Araujo --- board-qemu/config | 3 ++- lib/libnet/Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/board-qemu/config b/board-qemu/config index f194091..7307c4a 100644 --- a/board-qemu/config +++ b/board-qemu/config @@ -1,7 +1,8 @@ BOARD=qemu TARG=ppc64 -export FLAG="-DRTAS_NVRAM -DBROKEN_SC1 -DDHCPARCH=0x0C " +export FLAG="-DRTAS_NVRAM -DBROKEN_SC1" export CPUARCH=ppcp7 export CPUARCHDEF=-DCPU_PPCP7 +export DHCPARCH=-DDHCPARCH=0x0C #export SNK_BIOSEMU_APPS=1 FLASH_SIZE=8388608 diff --git a/lib/libnet/Makefile b/lib/libnet/Makefile index 83ac1e5..33fc66e 100644 --- a/lib/libnet/Makefile +++ b/lib/libnet/Makefile @@ -16,7 +16,7 @@ ifndef TOP endif include $(TOP)/make.rules -CFLAGS += -I. -I.. -I../libc/include -I$(TOP)/include +CFLAGS += -I. -I.. -I../libc/include -I$(TOP)/include $(DHCPARCH) SRCS = ethernet.c ipv4.c udp.c tcp.c dns.c bootp.c dhcp.c tftp.c \ ipv6.c dhcpv6.c icmpv6.c ndp.c netload.c ping.c args.c