> +       if (ip_version != 4 && ip_version != 6) {
> +               pr_debug("ip_version must be 4 or 6\n");
> +               return;
> +       }
>
>
> always true
>
>
> I should remove this check, then?
>
> What is the standard way to differentiate IPV4 vs v6 paths in network code?
> Is there an enum with IPV4 and IPV6 options that might be used instead?

My point was that there is no need to check against an unexpected input,
as this patch introduces the only two callers. The use of ip_version itself
is fine.

I did consider suggesting splitting into separate icmp and icmp6 handlers,
but most code is shared.

> Thanks,
> Ishaan

Please use plain text when responding. Your message did not arrive on the list.

Reply via email to