[SLOF] [PATCH v5 3/3] ping: use gateway address for routing

Alexey Kardashevskiy aik at ozlabs.ru
Thu May 5 16:07:35 AEST 2016


On 05/04/2016 02:29 PM, Nikunj A Dadhania wrote:
> ping was failing for machine across the subnet with statically assinged
> IP address. The parsed gateway address was ignored in the stack because
> the router variable was not set.
>
> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
> Reviewed-by: Thomas Huth <thuth at redhat.com>

Thanks, applied.

> ---
>  clients/net-snk/app/netapps/ping.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/clients/net-snk/app/netapps/ping.c b/clients/net-snk/app/netapps/ping.c
> index 91accd3..38771dc 100644
> --- a/clients/net-snk/app/netapps/ping.c
> +++ b/clients/net-snk/app/netapps/ping.c
> @@ -165,6 +165,8 @@ ping(int argc, char *argv[])
>
>  	} else {
>  		memcpy(&fn_ip.own_ip, &ping_args.client_ip.integer, 4);
> +		if (ping_args.gateway_ip.integer)
> +			set_ipv4_router(ping_args.gateway_ip.integer);
>  		if (!ping_args.netmask) {
>  			/* Netmask is not provided, assume default according to
>  			 * the network class
>


-- 
Alexey


More information about the SLOF mailing list