Message ID | 20170623122325.12439-1-muriloo@linux.vnet.ibm.com |
---|---|
State | Accepted |
Headers | show |
On 23/06/17 22:23, Murilo Opsfelder Araujo wrote: > 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 <muriloo@linux.vnet.ibm.com> > --- > > Changes from v1: > > - Do not export DHCPARCH separately from FLAG. > - Pass FLAG to make in SUBDIRS target of lib/Makefile. > - Append FLAG to CFLAGS in lib/libnet/Makefile. > > lib/Makefile | 2 +- > lib/libnet/Makefile | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Thanks, applied. > > diff --git a/lib/Makefile b/lib/Makefile > index a4d4bb2..1e8bb62 100644 > --- a/lib/Makefile > +++ b/lib/Makefile > @@ -21,7 +21,7 @@ all: subdirs > subdirs: $(SUBDIRS) > > $(SUBDIRS): > - $(MAKE) -C $@ $(MAKEARG) > + $(MAKE) -C $@ FLAG=$(FLAG) $(MAKEARG) > > # Rules for making clean: > clean: > diff --git a/lib/libnet/Makefile b/lib/libnet/Makefile > index 83ac1e5..dfefea9 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 $(FLAG) > > 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 >
diff --git a/lib/Makefile b/lib/Makefile index a4d4bb2..1e8bb62 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -21,7 +21,7 @@ all: subdirs subdirs: $(SUBDIRS) $(SUBDIRS): - $(MAKE) -C $@ $(MAKEARG) + $(MAKE) -C $@ FLAG=$(FLAG) $(MAKEARG) # Rules for making clean: clean: diff --git a/lib/libnet/Makefile b/lib/libnet/Makefile index 83ac1e5..dfefea9 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 $(FLAG) 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
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 <muriloo@linux.vnet.ibm.com> --- Changes from v1: - Do not export DHCPARCH separately from FLAG. - Pass FLAG to make in SUBDIRS target of lib/Makefile. - Append FLAG to CFLAGS in lib/libnet/Makefile. lib/Makefile | 2 +- lib/libnet/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)