Subject: Re: [IPv6] Update setsockopt(IPV6_MULTICAST_IF) to support RFC 3493

From: Brian Haley <[email-masked]>
Date: Wed, 10 Oct 2007 17:20:45 -0400

David Stevens wrote:
> What about just checking for 0 in the later test?
> 
>         if (val && __dev_get_by_index(val) == NULL) {

We could fail the next check right before that though:

           if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != val)
                   goto e_inval;

I just mimicked what the IPv4 code does in do_ip_setsockopt().

-Brian