diff options
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 0b0721bd45c6..3f93292b0ad8 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1263,11 +1263,10 @@ static int udp_setsockopt(struct sock *sk, int level, int optname, | |||
1263 | 1263 | ||
1264 | #ifdef CONFIG_COMPAT | 1264 | #ifdef CONFIG_COMPAT |
1265 | static int compat_udp_setsockopt(struct sock *sk, int level, int optname, | 1265 | static int compat_udp_setsockopt(struct sock *sk, int level, int optname, |
1266 | char __user *optval, int optlen) | 1266 | char __user *optval, int optlen) |
1267 | { | 1267 | { |
1268 | if (level != SOL_UDP) | 1268 | if (level != SOL_UDP) |
1269 | return compat_ip_setsockopt(sk, level, | 1269 | return compat_ip_setsockopt(sk, level, optname, optval, optlen); |
1270 | optname, optval, optlen); | ||
1271 | return do_udp_setsockopt(sk, level, optname, optval, optlen); | 1270 | return do_udp_setsockopt(sk, level, optname, optval, optlen); |
1272 | } | 1271 | } |
1273 | #endif | 1272 | #endif |
@@ -1316,11 +1315,10 @@ static int udp_getsockopt(struct sock *sk, int level, int optname, | |||
1316 | 1315 | ||
1317 | #ifdef CONFIG_COMPAT | 1316 | #ifdef CONFIG_COMPAT |
1318 | static int compat_udp_getsockopt(struct sock *sk, int level, int optname, | 1317 | static int compat_udp_getsockopt(struct sock *sk, int level, int optname, |
1319 | char __user *optval, int __user *optlen) | 1318 | char __user *optval, int __user *optlen) |
1320 | { | 1319 | { |
1321 | if (level != SOL_UDP) | 1320 | if (level != SOL_UDP) |
1322 | return compat_ip_getsockopt(sk, level, | 1321 | return compat_ip_getsockopt(sk, level, optname, optval, optlen); |
1323 | optname, optval, optlen); | ||
1324 | return do_udp_getsockopt(sk, level, optname, optval, optlen); | 1322 | return do_udp_getsockopt(sk, level, optname, optval, optlen); |
1325 | } | 1323 | } |
1326 | #endif | 1324 | #endif |
@@ -1372,27 +1370,27 @@ unsigned int udp_poll(struct file *file, struct socket *sock, poll_table *wait) | |||
1372 | } | 1370 | } |
1373 | 1371 | ||
1374 | struct proto udp_prot = { | 1372 | struct proto udp_prot = { |
1375 | .name = "UDP", | 1373 | .name = "UDP", |
1376 | .owner = THIS_MODULE, | 1374 | .owner = THIS_MODULE, |
1377 | .close = udp_close, | 1375 | .close = udp_close, |
1378 | .connect = ip4_datagram_connect, | 1376 | .connect = ip4_datagram_connect, |
1379 | .disconnect = udp_disconnect, | 1377 | .disconnect = udp_disconnect, |
1380 | .ioctl = udp_ioctl, | 1378 | .ioctl = udp_ioctl, |
1381 | .destroy = udp_destroy_sock, | 1379 | .destroy = udp_destroy_sock, |
1382 | .setsockopt = udp_setsockopt, | 1380 | .setsockopt = udp_setsockopt, |
1383 | .getsockopt = udp_getsockopt, | 1381 | .getsockopt = udp_getsockopt, |
1382 | .sendmsg = udp_sendmsg, | ||
1383 | .recvmsg = udp_recvmsg, | ||
1384 | .sendpage = udp_sendpage, | ||
1385 | .backlog_rcv = udp_queue_rcv_skb, | ||
1386 | .hash = udp_v4_hash, | ||
1387 | .unhash = udp_v4_unhash, | ||
1388 | .get_port = udp_v4_get_port, | ||
1389 | .obj_size = sizeof(struct udp_sock), | ||
1384 | #ifdef CONFIG_COMPAT | 1390 | #ifdef CONFIG_COMPAT |
1385 | .compat_setsockopt = compat_udp_setsockopt, | 1391 | .compat_setsockopt = compat_udp_setsockopt, |
1386 | .compat_getsockopt = compat_udp_getsockopt, | 1392 | .compat_getsockopt = compat_udp_getsockopt, |
1387 | #endif | 1393 | #endif |
1388 | .sendmsg = udp_sendmsg, | ||
1389 | .recvmsg = udp_recvmsg, | ||
1390 | .sendpage = udp_sendpage, | ||
1391 | .backlog_rcv = udp_queue_rcv_skb, | ||
1392 | .hash = udp_v4_hash, | ||
1393 | .unhash = udp_v4_unhash, | ||
1394 | .get_port = udp_v4_get_port, | ||
1395 | .obj_size = sizeof(struct udp_sock), | ||
1396 | }; | 1394 | }; |
1397 | 1395 | ||
1398 | /* ------------------------------------------------------------------------ */ | 1396 | /* ------------------------------------------------------------------------ */ |