[IPV6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()
authorBrian Haley <brian.haley@hp.com>
Wed, 9 Jan 2008 07:52:21 +0000 (23:52 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Jan 2008 07:52:21 +0000 (23:52 -0800)
Signed-off-by: Brian Haley <brian.haley@hp.com>
Acked-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/datagram.c

index 2ed689a..5d4245a 100644 (file)
@@ -123,11 +123,11 @@ ipv4_connected:
                                goto out;
                        }
                        sk->sk_bound_dev_if = usin->sin6_scope_id;
-                       if (!sk->sk_bound_dev_if &&
-                           (addr_type & IPV6_ADDR_MULTICAST))
-                               fl.oif = np->mcast_oif;
                }
 
+               if (!sk->sk_bound_dev_if && (addr_type & IPV6_ADDR_MULTICAST))
+                       sk->sk_bound_dev_if = np->mcast_oif;
+
                /* Connect to link-local address requires an interface */
                if (!sk->sk_bound_dev_if) {
                        err = -EINVAL;