]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blobdiff - net/netrom/af_netrom.c
net: pass kern to net_proto_family create function
[mirror_ubuntu-eoan-kernel.git] / net / netrom / af_netrom.c
index ce51ce012cdab48e4c0bbfd99c3053a0bfcaa636..4bdd5697f63b6a60a643b7c97b1690afd11f01ac 100644 (file)
@@ -301,7 +301,7 @@ void nr_destroy_socket(struct sock *sk)
  */
 
 static int nr_setsockopt(struct socket *sock, int level, int optname,
-       char __user *optval, int optlen)
+       char __user *optval, unsigned int optlen)
 {
        struct sock *sk = sock->sk;
        struct nr_sock *nr = nr_sk(sk);
@@ -425,7 +425,8 @@ static struct proto nr_proto = {
        .obj_size = sizeof(struct nr_sock),
 };
 
-static int nr_create(struct net *net, struct socket *sock, int protocol)
+static int nr_create(struct net *net, struct socket *sock, int protocol,
+                    int kern)
 {
        struct sock *sk;
        struct nr_sock *nr;
@@ -847,6 +848,7 @@ static int nr_getname(struct socket *sock, struct sockaddr *uaddr,
                sax->fsa_ax25.sax25_family = AF_NETROM;
                sax->fsa_ax25.sax25_ndigis = 1;
                sax->fsa_ax25.sax25_call   = nr->user_addr;
+               memset(sax->fsa_digipeater, 0, sizeof(sax->fsa_digipeater));
                sax->fsa_digipeater[0]     = nr->dest_addr;
                *uaddr_len = sizeof(struct full_sockaddr_ax25);
        } else {
@@ -1371,7 +1373,7 @@ static const struct file_operations nr_info_fops = {
 };
 #endif /* CONFIG_PROC_FS */
 
-static struct net_proto_family nr_family_ops = {
+static const struct net_proto_family nr_family_ops = {
        .family         =       PF_NETROM,
        .create         =       nr_create,
        .owner          =       THIS_MODULE,