diff options
author | Tom Rini <trini@konsulko.com> | 2025-07-07 14:10:59 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-07-07 14:10:59 -0600 |
commit | 6d0b8874fde96c88e866c1e5ae0018354b7cd7d6 (patch) | |
tree | fc498e7eaa23b8d27c701648bd3d0f92160bde39 /drivers/net/netconsole.c | |
parent | e37de002fac3895e8d0b60ae2015e17bb33e2b5b (diff) | |
parent | 7598b469c16d97128d9c22839b06d94c5c331a7e (diff) |
Merge branch 'next'
Diffstat (limited to 'drivers/net/netconsole.c')
-rw-r--r-- | drivers/net/netconsole.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 1943de8ba73..c2ce4a80d12 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -61,8 +61,8 @@ static int is_broadcast(struct in_addr ip) /* update only when the environment has changed */ if (env_changed_id != env_id) { - netmask = env_get_ip("netmask"); - our_ip = env_get_ip("ipaddr"); + netmask = string_to_ip(env_get("netmask")); + our_ip = string_to_ip(env_get("ipaddr")); env_changed_id = env_id; } @@ -81,11 +81,12 @@ static int refresh_settings_from_env(void) /* update only when the environment has changed */ if (env_changed_id != env_id) { - if (env_get("ncip")) { - nc_ip = env_get_ip("ncip"); + char *tmp = env_get("ncip"); + if (tmp) { + nc_ip = string_to_ip(tmp); if (!nc_ip.s_addr) return -1; /* ncip is 0.0.0.0 */ - p = strchr(env_get("ncip"), ':'); + p = strchr(tmp, ':'); if (p != NULL) { nc_out_port = dectoul(p + 1, NULL); nc_in_port = nc_out_port; |