If user asks for a congestion control type with setsockopt() then it
may be available as a module not included in the kernel already. 
It should be autoloaded if needed.  This is done already when
the default selection is change with sysctl, but not when application
requests via sysctl.

Only reservation is are there any bad security implications from this?

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

--- orig/net/ipv4/tcp_cong.c    2006-10-25 13:55:34.000000000 -0700
+++ new/net/ipv4/tcp_cong.c     2006-10-25 13:58:39.000000000 -0700
@@ -153,9 +153,19 @@
 
        rcu_read_lock();
        ca = tcp_ca_find(name);
+       /* no change asking for existing value */
        if (ca == icsk->icsk_ca_ops)
                goto out;
 
+#ifdef CONFIG_KMOD
+       /* not found attempt to autoload module */
+       if (!ca) {
+               rcu_read_unlock();
+               request_module("tcp_%s", name);
+               rcu_read_lock();
+               ca = tcp_ca_find(name);
+       }
+#endif
        if (!ca)
                err = -ENOENT;
 
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to