diff options
author | Stavros Passas <stavros.passas@movidius.com> | 2017-01-20 09:22:46 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-06-08 10:06:33 +0200 |
commit | 258534718910c903451f1fe2e8fe1197c224c8e7 (patch) | |
tree | 8940058ea0c6a816617b63b5872508e47ca2dd42 /cpukit/libnetworking/nfs/bootp_subr.c | |
parent | bsps/arm: Fix ARMv7-M interrupt suppport (diff) | |
download | rtems-258534718910c903451f1fe2e8fe1197c224c8e7.tar.bz2 |
network: Fix DHCP client protocol
Close #2877.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libnetworking/nfs/bootp_subr.c | 9 |
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; |