summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking/nfs/bootp_subr.c
diff options
context:
space:
mode:
authorStavros Passas <stavros.passas@movidius.com>2017-01-20 09:22:46 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-06-08 10:06:33 +0200
commit258534718910c903451f1fe2e8fe1197c224c8e7 (patch)
tree8940058ea0c6a816617b63b5872508e47ca2dd42 /cpukit/libnetworking/nfs/bootp_subr.c
parentbsps/arm: Fix ARMv7-M interrupt suppport (diff)
downloadrtems-258534718910c903451f1fe2e8fe1197c224c8e7.tar.bz2
network: Fix DHCP client protocol
Close #2877.
Diffstat (limited to '')
-rw-r--r--cpukit/libnetworking/nfs/bootp_subr.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/cpukit/libnetworking/nfs/bootp_subr.c b/cpukit/libnetworking/nfs/bootp_subr.c
index 3e71e95e08..b24ba945e7 100644
--- a/cpukit/libnetworking/nfs/bootp_subr.c
+++ b/cpukit/libnetworking/nfs/bootp_subr.c
@@ -284,7 +284,9 @@ int
bootpc_call(
struct bootp_packet *call,
struct bootp_packet *reply, /* output */
- struct proc *procp)
+ struct proc *procp,
+ const void *exp_vend,
+ size_t exp_vend_len)
{
struct socket *so;
struct sockaddr_in *sin;
@@ -450,6 +452,9 @@ bootpc_call(
if (bcmp(reply->chaddr,call->chaddr,call->hlen))
continue;
+ if (exp_vend_len > 0 && bcmp(exp_vend, reply->vend, exp_vend_len))
+ continue;
+
goto gotreply; /* break two levels */
} /* while secs */
@@ -1051,7 +1056,7 @@ bootpc_init(bool update_files, bool forever)
call.secs = 0;
call.flags = htons(0x8000); /* We need an broadcast answer */
- error = bootpc_call(&call,&reply,procp);
+ error = bootpc_call(&call,&reply,procp, NULL, 0);
if (!error)
break;