patch-2.1.78 linux/net/ipv4/af_inet.c

Next file: linux/net/netsyms.c
Previous file: linux/net/core/filter.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.77/linux/net/ipv4/af_inet.c linux/net/ipv4/af_inet.c
@@ -326,7 +326,15 @@
 	if (sock->type == SOCK_PACKET) {
 		static int warned; 
 		if (net_families[AF_PACKET]==NULL)
+		{
+#if defined(CONFIG_KERNELD) && defined(CONFIG_PACKET_MODULE)
+			char module_name[30];
+			sprintf(module_name,"net-pf-%d", AF_PACKET);
+			request_module(module_name);
+			if (net_families[AF_PACKET] == NULL)
+#endif
 			return -ESOCKTNOSUPPORT;
+		}
 		if (!warned++)
 			printk(KERN_INFO "%s uses obsolete (AF_INET,SOCK_PACKET)\n", current->comm);
 		return net_families[AF_PACKET]->create(sock, protocol);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov