# HG changeset patch # User gthomas # Date 1148473486 0 # Node ID 990ca86dc9d4ec1d697527d3672a8941927002d0 # Parent acfe2ec525905f467203abfc168589a551e7741e Don't try 'ip_address' command if no networking - avoids crash diff --git a/packages/redboot/current/ChangeLog b/packages/redboot/current/ChangeLog --- a/packages/redboot/current/ChangeLog +++ b/packages/redboot/current/ChangeLog @@ -1,3 +1,7 @@ +2006-05-24 Gary Thomas + + * src/net/net_io.c (do_ip_addr): Bail out if no networking. + 2006-05-23 Gary Thomas * src/flash.c (fis_update_directory): Fix problems building on systems diff --git a/packages/redboot/current/src/net/net_io.c b/packages/redboot/current/src/net/net_io.c --- a/packages/redboot/current/src/net/net_io.c +++ b/packages/redboot/current/src/net/net_io.c @@ -838,6 +838,11 @@ do_ip_addr(int argc, char *argv[]) bool dns_addr_set; #endif int num_opts; + + if (!have_net) { + diag_printf("Sorry, networking is not available.\n"); + return; + } init_opts(&opts[0], 'l', true, OPTION_ARG_TYPE_STR, (void *)&ip_addr, (bool *)&ip_addr_set, "local IP address");