diff options
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 120 |
1 files changed, 66 insertions, 54 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 6c9711ac1c03..e19457fe4f6e 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -456,45 +456,53 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
456 | } | 456 | } |
457 | 457 | ||
458 | const struct proto_ops inet6_stream_ops = { | 458 | const struct proto_ops inet6_stream_ops = { |
459 | .family = PF_INET6, | 459 | .family = PF_INET6, |
460 | .owner = THIS_MODULE, | 460 | .owner = THIS_MODULE, |
461 | .release = inet6_release, | 461 | .release = inet6_release, |
462 | .bind = inet6_bind, | 462 | .bind = inet6_bind, |
463 | .connect = inet_stream_connect, /* ok */ | 463 | .connect = inet_stream_connect, /* ok */ |
464 | .socketpair = sock_no_socketpair, /* a do nothing */ | 464 | .socketpair = sock_no_socketpair, /* a do nothing */ |
465 | .accept = inet_accept, /* ok */ | 465 | .accept = inet_accept, /* ok */ |
466 | .getname = inet6_getname, | 466 | .getname = inet6_getname, |
467 | .poll = tcp_poll, /* ok */ | 467 | .poll = tcp_poll, /* ok */ |
468 | .ioctl = inet6_ioctl, /* must change */ | 468 | .ioctl = inet6_ioctl, /* must change */ |
469 | .listen = inet_listen, /* ok */ | 469 | .listen = inet_listen, /* ok */ |
470 | .shutdown = inet_shutdown, /* ok */ | 470 | .shutdown = inet_shutdown, /* ok */ |
471 | .setsockopt = sock_common_setsockopt, /* ok */ | 471 | .setsockopt = sock_common_setsockopt, /* ok */ |
472 | .getsockopt = sock_common_getsockopt, /* ok */ | 472 | .getsockopt = sock_common_getsockopt, /* ok */ |
473 | .sendmsg = inet_sendmsg, /* ok */ | 473 | .sendmsg = inet_sendmsg, /* ok */ |
474 | .recvmsg = sock_common_recvmsg, /* ok */ | 474 | .recvmsg = sock_common_recvmsg, /* ok */ |
475 | .mmap = sock_no_mmap, | 475 | .mmap = sock_no_mmap, |
476 | .sendpage = tcp_sendpage | 476 | .sendpage = tcp_sendpage, |
477 | #ifdef CONFIG_COMPAT | ||
478 | .compat_setsockopt = compat_sock_common_setsockopt, | ||
479 | .compat_getsockopt = compat_sock_common_getsockopt, | ||
480 | #endif | ||
477 | }; | 481 | }; |
478 | 482 | ||
479 | const struct proto_ops inet6_dgram_ops = { | 483 | const struct proto_ops inet6_dgram_ops = { |
480 | .family = PF_INET6, | 484 | .family = PF_INET6, |
481 | .owner = THIS_MODULE, | 485 | .owner = THIS_MODULE, |
482 | .release = inet6_release, | 486 | .release = inet6_release, |
483 | .bind = inet6_bind, | 487 | .bind = inet6_bind, |
484 | .connect = inet_dgram_connect, /* ok */ | 488 | .connect = inet_dgram_connect, /* ok */ |
485 | .socketpair = sock_no_socketpair, /* a do nothing */ | 489 | .socketpair = sock_no_socketpair, /* a do nothing */ |
486 | .accept = sock_no_accept, /* a do nothing */ | 490 | .accept = sock_no_accept, /* a do nothing */ |
487 | .getname = inet6_getname, | 491 | .getname = inet6_getname, |
488 | .poll = udp_poll, /* ok */ | 492 | .poll = udp_poll, /* ok */ |
489 | .ioctl = inet6_ioctl, /* must change */ | 493 | .ioctl = inet6_ioctl, /* must change */ |
490 | .listen = sock_no_listen, /* ok */ | 494 | .listen = sock_no_listen, /* ok */ |
491 | .shutdown = inet_shutdown, /* ok */ | 495 | .shutdown = inet_shutdown, /* ok */ |
492 | .setsockopt = sock_common_setsockopt, /* ok */ | 496 | .setsockopt = sock_common_setsockopt, /* ok */ |
493 | .getsockopt = sock_common_getsockopt, /* ok */ | 497 | .getsockopt = sock_common_getsockopt, /* ok */ |
494 | .sendmsg = inet_sendmsg, /* ok */ | 498 | .sendmsg = inet_sendmsg, /* ok */ |
495 | .recvmsg = sock_common_recvmsg, /* ok */ | 499 | .recvmsg = sock_common_recvmsg, /* ok */ |
496 | .mmap = sock_no_mmap, | 500 | .mmap = sock_no_mmap, |
497 | .sendpage = sock_no_sendpage, | 501 | .sendpage = sock_no_sendpage, |
502 | #ifdef CONFIG_COMPAT | ||
503 | .compat_setsockopt = compat_sock_common_setsockopt, | ||
504 | .compat_getsockopt = compat_sock_common_getsockopt, | ||
505 | #endif | ||
498 | }; | 506 | }; |
499 | 507 | ||
500 | static struct net_proto_family inet6_family_ops = { | 508 | static struct net_proto_family inet6_family_ops = { |
@@ -505,24 +513,28 @@ static struct net_proto_family inet6_family_ops = { | |||
505 | 513 | ||
506 | /* Same as inet6_dgram_ops, sans udp_poll. */ | 514 | /* Same as inet6_dgram_ops, sans udp_poll. */ |
507 | static const struct proto_ops inet6_sockraw_ops = { | 515 | static const struct proto_ops inet6_sockraw_ops = { |
508 | .family = PF_INET6, | 516 | .family = PF_INET6, |
509 | .owner = THIS_MODULE, | 517 | .owner = THIS_MODULE, |
510 | .release = inet6_release, | 518 | .release = inet6_release, |
511 | .bind = inet6_bind, | 519 | .bind = inet6_bind, |
512 | .connect = inet_dgram_connect, /* ok */ | 520 | .connect = inet_dgram_connect, /* ok */ |
513 | .socketpair = sock_no_socketpair, /* a do nothing */ | 521 | .socketpair = sock_no_socketpair, /* a do nothing */ |
514 | .accept = sock_no_accept, /* a do nothing */ | 522 | .accept = sock_no_accept, /* a do nothing */ |
515 | .getname = inet6_getname, | 523 | .getname = inet6_getname, |
516 | .poll = datagram_poll, /* ok */ | 524 | .poll = datagram_poll, /* ok */ |
517 | .ioctl = inet6_ioctl, /* must change */ | 525 | .ioctl = inet6_ioctl, /* must change */ |
518 | .listen = sock_no_listen, /* ok */ | 526 | .listen = sock_no_listen, /* ok */ |
519 | .shutdown = inet_shutdown, /* ok */ | 527 | .shutdown = inet_shutdown, /* ok */ |
520 | .setsockopt = sock_common_setsockopt, /* ok */ | 528 | .setsockopt = sock_common_setsockopt, /* ok */ |
521 | .getsockopt = sock_common_getsockopt, /* ok */ | 529 | .getsockopt = sock_common_getsockopt, /* ok */ |
522 | .sendmsg = inet_sendmsg, /* ok */ | 530 | .sendmsg = inet_sendmsg, /* ok */ |
523 | .recvmsg = sock_common_recvmsg, /* ok */ | 531 | .recvmsg = sock_common_recvmsg, /* ok */ |
524 | .mmap = sock_no_mmap, | 532 | .mmap = sock_no_mmap, |
525 | .sendpage = sock_no_sendpage, | 533 | .sendpage = sock_no_sendpage, |
534 | #ifdef CONFIG_COMPAT | ||
535 | .compat_setsockopt = compat_sock_common_setsockopt, | ||
536 | .compat_getsockopt = compat_sock_common_getsockopt, | ||
537 | #endif | ||
526 | }; | 538 | }; |
527 | 539 | ||
528 | static struct inet_protosw rawv6_protosw = { | 540 | static struct inet_protosw rawv6_protosw = { |