.. | .. |
---|
12 | 12 | #include <linux/proc_fs.h> |
---|
13 | 13 | #include "udp_impl.h" |
---|
14 | 14 | |
---|
| 15 | +static int udplitev6_sk_init(struct sock *sk) |
---|
| 16 | +{ |
---|
| 17 | + udpv6_init_sock(sk); |
---|
| 18 | + udp_sk(sk)->pcflag = UDPLITE_BIT; |
---|
| 19 | + return 0; |
---|
| 20 | +} |
---|
| 21 | + |
---|
15 | 22 | static int udplitev6_rcv(struct sk_buff *skb) |
---|
16 | 23 | { |
---|
17 | 24 | return __udp6_lib_rcv(skb, &udplite_table, IPPROTO_UDPLITE); |
---|
.. | .. |
---|
38 | 45 | .connect = ip6_datagram_connect, |
---|
39 | 46 | .disconnect = udp_disconnect, |
---|
40 | 47 | .ioctl = udp_ioctl, |
---|
41 | | - .init = udplite_sk_init, |
---|
| 48 | + .init = udplitev6_sk_init, |
---|
42 | 49 | .destroy = udpv6_destroy_sock, |
---|
43 | 50 | .setsockopt = udpv6_setsockopt, |
---|
44 | 51 | .getsockopt = udpv6_getsockopt, |
---|
.. | .. |
---|
50 | 57 | .get_port = udp_v6_get_port, |
---|
51 | 58 | .memory_allocated = &udp_memory_allocated, |
---|
52 | 59 | .sysctl_mem = sysctl_udp_mem, |
---|
| 60 | + .sysctl_wmem_offset = offsetof(struct net, ipv4.sysctl_udp_wmem_min), |
---|
| 61 | + .sysctl_rmem_offset = offsetof(struct net, ipv4.sysctl_udp_rmem_min), |
---|
53 | 62 | .obj_size = sizeof(struct udp6_sock), |
---|
54 | 63 | .h.udp_table = &udplite_table, |
---|
55 | 64 | }; |
---|