Skip to content
Snippets Groups Projects
Commit 5d110f0a authored by Wilson Callan's avatar Wilson Callan Committed by Ben Warren
Browse files

New CONFIG_BOOTP_SERVERIP option


Added CONFIG_BOOTP_SERVERIP to allow the tftp server to be different
from the bootp server

Signed-off-by: default avatarWilson Callan <wcallan@savantav.com>
Signed-off-by: default avatarBen Warren <bwarren@qstreams.com>
parent 50cca8b9
No related branches found
No related tags found
No related merge requests found
...@@ -1102,6 +1102,9 @@ The following options need to be configured: ...@@ -1102,6 +1102,9 @@ The following options need to be configured:
CONFIG_BOOTP_TIMEOFFSET CONFIG_BOOTP_TIMEOFFSET
CONFIG_BOOTP_VENDOREX CONFIG_BOOTP_VENDOREX
CONFIG_BOOTP_SERVERIP - TFTP server will be the serverip
environment variable, not the BOOTP server.
CONFIG_BOOTP_DNS2 - If a DHCP client requests the DNS CONFIG_BOOTP_DNS2 - If a DHCP client requests the DNS
serverip from a DHCP server, it is possible that more serverip from a DHCP server, it is possible that more
than one DNS serverip is offered to the client. than one DNS serverip is offered to the client.
...@@ -1114,7 +1117,7 @@ The following options need to be configured: ...@@ -1114,7 +1117,7 @@ The following options need to be configured:
CONFIG_BOOTP_SEND_HOSTNAME - Some DHCP servers are capable CONFIG_BOOTP_SEND_HOSTNAME - Some DHCP servers are capable
to do a dynamic update of a DNS server. To do this, they to do a dynamic update of a DNS server. To do this, they
need the hostname of the DHCP requester. need the hostname of the DHCP requester.
If CONFIG_BOOP_SEND_HOSTNAME is defined, the content If CONFIG_BOOTP_SEND_HOSTNAME is defined, the content
of the "hostname" environment variable is passed as of the "hostname" environment variable is passed as
option 12 to the DHCP server. option 12 to the DHCP server.
......
...@@ -120,10 +120,12 @@ static void BootpCopyNetParams(Bootp_t *bp) ...@@ -120,10 +120,12 @@ static void BootpCopyNetParams(Bootp_t *bp)
IPaddr_t tmp_ip; IPaddr_t tmp_ip;
NetCopyIP(&NetOurIP, &bp->bp_yiaddr); NetCopyIP(&NetOurIP, &bp->bp_yiaddr);
#if !defined(CONFIG_BOOTP_SERVERIP)
NetCopyIP(&tmp_ip, &bp->bp_siaddr); NetCopyIP(&tmp_ip, &bp->bp_siaddr);
if (tmp_ip != 0) if (tmp_ip != 0)
NetCopyIP(&NetServerIP, &bp->bp_siaddr); NetCopyIP(&NetServerIP, &bp->bp_siaddr);
memcpy (NetServerEther, ((Ethernet_t *)NetRxPkt)->et_src, 6); memcpy (NetServerEther, ((Ethernet_t *)NetRxPkt)->et_src, 6);
#endif
if (strlen(bp->bp_file) > 0) if (strlen(bp->bp_file) > 0)
copy_filename (BootFile, bp->bp_file, sizeof(BootFile)); copy_filename (BootFile, bp->bp_file, sizeof(BootFile));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment