udp: call udp_encap_enable for v6 sockets when enabling encap
[linux-2.6-microblaze.git] / drivers / net / bareudp.c
index 1b8f597..7511bca 100644 (file)
@@ -240,12 +240,6 @@ static int bareudp_socket_create(struct bareudp_dev *bareudp, __be16 port)
        tunnel_cfg.encap_destroy = NULL;
        setup_udp_tunnel_sock(bareudp->net, sock, &tunnel_cfg);
 
-       /* As the setup_udp_tunnel_sock does not call udp_encap_enable if the
-        * socket type is v6 an explicit call to udp_encap_enable is needed.
-        */
-       if (sock->sk->sk_family == AF_INET6)
-               udp_encap_enable();
-
        rcu_assign_pointer(bareudp->sock, sock);
        return 0;
 }