diff options
Diffstat (limited to 'net/ipv4/udplite.c')
| -rw-r--r-- | net/ipv4/udplite.c | 23 | 
1 files changed, 17 insertions, 6 deletions
diff --git a/net/ipv4/udplite.c b/net/ipv4/udplite.c index ab76aa928fa..3b3efbda48e 100644 --- a/net/ipv4/udplite.c +++ b/net/ipv4/udplite.c @@ -10,6 +10,10 @@   *		as published by the Free Software Foundation; either version   *		2 of the License, or (at your option) any later version.   */ + +#define pr_fmt(fmt) "UDPLite: " fmt + +#include <linux/export.h>  #include "udp_impl.h"  struct udp_table 	udplite_table __read_mostly; @@ -57,6 +61,7 @@ struct proto 	udplite_prot = {  	.compat_setsockopt = compat_udp_setsockopt,  	.compat_getsockopt = compat_udp_getsockopt,  #endif +	.clear_sk	   = sk_prot_clear_portaddr_nulls,  };  EXPORT_SYMBOL(udplite_prot); @@ -65,18 +70,24 @@ static struct inet_protosw udplite4_protosw = {  	.protocol	=  IPPROTO_UDPLITE,  	.prot		=  &udplite_prot,  	.ops		=  &inet_dgram_ops, -	.no_check	=  0,		/* must checksum (RFC 3828) */  	.flags		=  INET_PROTOSW_PERMANENT,  };  #ifdef CONFIG_PROC_FS + +static const struct file_operations udplite_afinfo_seq_fops = { +	.owner    = THIS_MODULE, +	.open     = udp_seq_open, +	.read     = seq_read, +	.llseek   = seq_lseek, +	.release  = seq_release_net +}; +  static struct udp_seq_afinfo udplite4_seq_afinfo = {  	.name		= "udplite",  	.family		= AF_INET,  	.udp_table 	= &udplite_table, -	.seq_fops	= { -		.owner	=	THIS_MODULE, -	}, +	.seq_fops	= &udplite_afinfo_seq_fops,  	.seq_ops	= {  		.show		= udp4_seq_show,  	}, @@ -120,11 +131,11 @@ void __init udplite4_register(void)  	inet_register_protosw(&udplite4_protosw);  	if (udplite4_proc_init()) -		printk(KERN_ERR "%s: Cannot register /proc!\n", __func__); +		pr_err("%s: Cannot register /proc!\n", __func__);  	return;  out_unregister_proto:  	proto_unregister(&udplite_prot);  out_register_err: -	printk(KERN_CRIT "%s: Cannot add UDP-Lite protocol.\n", __func__); +	pr_crit("%s: Cannot add UDP-Lite protocol\n", __func__);  }  | 
