mirror of
https://github.com/ipxe/ipxe
synced 2025-12-09 20:09:53 +03:00
[tftp] Avoid setting current working URI to "tftp://0.0.0.0/"
Set the current working URI to NULL rather than to "tftp://0.0.0.0/". Reported-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -1245,11 +1245,15 @@ static int tftp_apply_settings ( void ) {
|
|||||||
* applicators.
|
* applicators.
|
||||||
*/
|
*/
|
||||||
if ( tftp_server.s_addr != last_tftp_server.s_addr ) {
|
if ( tftp_server.s_addr != last_tftp_server.s_addr ) {
|
||||||
snprintf ( uri_string, sizeof ( uri_string ),
|
if ( tftp_server.s_addr ) {
|
||||||
"tftp://%s/", inet_ntoa ( tftp_server ) );
|
snprintf ( uri_string, sizeof ( uri_string ),
|
||||||
uri = parse_uri ( uri_string );
|
"tftp://%s/", inet_ntoa ( tftp_server ) );
|
||||||
if ( ! uri )
|
uri = parse_uri ( uri_string );
|
||||||
return -ENOMEM;
|
if ( ! uri )
|
||||||
|
return -ENOMEM;
|
||||||
|
} else {
|
||||||
|
uri = NULL;
|
||||||
|
}
|
||||||
churi ( uri );
|
churi ( uri );
|
||||||
uri_put ( uri );
|
uri_put ( uri );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user