diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-19 10:52:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-19 10:52:45 -0500 |
commit | 07ce198a1eb3431d04a6d59ea9fb7b71f21e33b1 (patch) | |
tree | fe6e6208bdcdfb7bbb0c81923efcb75bf73a299b /net/netlabel/netlabel_cipso_v4.c | |
parent | 4bc87e62775052aac0be7574d5f84ff06f61c6b4 (diff) | |
parent | a442585952f137bd4cdb1f2f3166e4157d383b82 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (60 commits)
[NIU]: Bump driver version and release date.
[NIU]: Fix BMAC alternate MAC address indexing.
net: fix kernel-doc warnings in header files
[IPV6]: Use BUG_ON instead of if + BUG in fib6_del_route.
[IPV6]: dst_entry leak in ip4ip6_err. (resend)
bluetooth: do not move child device other than rfcomm
bluetooth: put hci dev after del conn
[NET]: Elminate spurious print_mac() calls.
[BLUETOOTH] hci_sysfs.c: Kill build warning.
[NET]: Remove MAC_FMT
net/8021q/vlan_dev.c: Use print_mac.
[XFRM]: Fix ordering issue in xfrm_dst_hash_transfer().
[BLUETOOTH] net/bluetooth/hci_core.c: Use time_* macros
[IPV6]: Fix hardcoded removing of old module code
[NETLABEL]: Move some initialization code into __init section.
[NETLABEL]: Shrink the genl-ops registration code.
[AX25] ax25_out: check skb for NULL in ax25_kick()
[TCP]: Fix tcp_v4_send_synack() comment
[IPV4]: fix alignment of IP-Config output
Documentation: fix tcp.txt
...
Diffstat (limited to 'net/netlabel/netlabel_cipso_v4.c')
-rw-r--r-- | net/netlabel/netlabel_cipso_v4.c | 45 |
1 files changed, 17 insertions, 28 deletions
diff --git a/net/netlabel/netlabel_cipso_v4.c b/net/netlabel/netlabel_cipso_v4.c index c7ad64d664ad..fdc14a0d21af 100644 --- a/net/netlabel/netlabel_cipso_v4.c +++ b/net/netlabel/netlabel_cipso_v4.c | |||
@@ -718,36 +718,35 @@ static int netlbl_cipsov4_remove(struct sk_buff *skb, struct genl_info *info) | |||
718 | * NetLabel Generic NETLINK Command Definitions | 718 | * NetLabel Generic NETLINK Command Definitions |
719 | */ | 719 | */ |
720 | 720 | ||
721 | static struct genl_ops netlbl_cipsov4_genl_c_add = { | 721 | static struct genl_ops netlbl_cipsov4_ops[] = { |
722 | { | ||
722 | .cmd = NLBL_CIPSOV4_C_ADD, | 723 | .cmd = NLBL_CIPSOV4_C_ADD, |
723 | .flags = GENL_ADMIN_PERM, | 724 | .flags = GENL_ADMIN_PERM, |
724 | .policy = netlbl_cipsov4_genl_policy, | 725 | .policy = netlbl_cipsov4_genl_policy, |
725 | .doit = netlbl_cipsov4_add, | 726 | .doit = netlbl_cipsov4_add, |
726 | .dumpit = NULL, | 727 | .dumpit = NULL, |
727 | }; | 728 | }, |
728 | 729 | { | |
729 | static struct genl_ops netlbl_cipsov4_genl_c_remove = { | ||
730 | .cmd = NLBL_CIPSOV4_C_REMOVE, | 730 | .cmd = NLBL_CIPSOV4_C_REMOVE, |
731 | .flags = GENL_ADMIN_PERM, | 731 | .flags = GENL_ADMIN_PERM, |
732 | .policy = netlbl_cipsov4_genl_policy, | 732 | .policy = netlbl_cipsov4_genl_policy, |
733 | .doit = netlbl_cipsov4_remove, | 733 | .doit = netlbl_cipsov4_remove, |
734 | .dumpit = NULL, | 734 | .dumpit = NULL, |
735 | }; | 735 | }, |
736 | 736 | { | |
737 | static struct genl_ops netlbl_cipsov4_genl_c_list = { | ||
738 | .cmd = NLBL_CIPSOV4_C_LIST, | 737 | .cmd = NLBL_CIPSOV4_C_LIST, |
739 | .flags = 0, | 738 | .flags = 0, |
740 | .policy = netlbl_cipsov4_genl_policy, | 739 | .policy = netlbl_cipsov4_genl_policy, |
741 | .doit = netlbl_cipsov4_list, | 740 | .doit = netlbl_cipsov4_list, |
742 | .dumpit = NULL, | 741 | .dumpit = NULL, |
743 | }; | 742 | }, |
744 | 743 | { | |
745 | static struct genl_ops netlbl_cipsov4_genl_c_listall = { | ||
746 | .cmd = NLBL_CIPSOV4_C_LISTALL, | 744 | .cmd = NLBL_CIPSOV4_C_LISTALL, |
747 | .flags = 0, | 745 | .flags = 0, |
748 | .policy = netlbl_cipsov4_genl_policy, | 746 | .policy = netlbl_cipsov4_genl_policy, |
749 | .doit = NULL, | 747 | .doit = NULL, |
750 | .dumpit = netlbl_cipsov4_listall, | 748 | .dumpit = netlbl_cipsov4_listall, |
749 | }, | ||
751 | }; | 750 | }; |
752 | 751 | ||
753 | /* | 752 | /* |
@@ -762,30 +761,20 @@ static struct genl_ops netlbl_cipsov4_genl_c_listall = { | |||
762 | * mechanism. Returns zero on success, negative values on failure. | 761 | * mechanism. Returns zero on success, negative values on failure. |
763 | * | 762 | * |
764 | */ | 763 | */ |
765 | int netlbl_cipsov4_genl_init(void) | 764 | int __init netlbl_cipsov4_genl_init(void) |
766 | { | 765 | { |
767 | int ret_val; | 766 | int ret_val, i; |
768 | 767 | ||
769 | ret_val = genl_register_family(&netlbl_cipsov4_gnl_family); | 768 | ret_val = genl_register_family(&netlbl_cipsov4_gnl_family); |
770 | if (ret_val != 0) | 769 | if (ret_val != 0) |
771 | return ret_val; | 770 | return ret_val; |
772 | 771 | ||
773 | ret_val = genl_register_ops(&netlbl_cipsov4_gnl_family, | 772 | for (i = 0; i < ARRAY_SIZE(netlbl_cipsov4_ops); i++) { |
774 | &netlbl_cipsov4_genl_c_add); | 773 | ret_val = genl_register_ops(&netlbl_cipsov4_gnl_family, |
775 | if (ret_val != 0) | 774 | &netlbl_cipsov4_ops[i]); |
776 | return ret_val; | 775 | if (ret_val != 0) |
777 | ret_val = genl_register_ops(&netlbl_cipsov4_gnl_family, | 776 | return ret_val; |
778 | &netlbl_cipsov4_genl_c_remove); | 777 | } |
779 | if (ret_val != 0) | ||
780 | return ret_val; | ||
781 | ret_val = genl_register_ops(&netlbl_cipsov4_gnl_family, | ||
782 | &netlbl_cipsov4_genl_c_list); | ||
783 | if (ret_val != 0) | ||
784 | return ret_val; | ||
785 | ret_val = genl_register_ops(&netlbl_cipsov4_gnl_family, | ||
786 | &netlbl_cipsov4_genl_c_listall); | ||
787 | if (ret_val != 0) | ||
788 | return ret_val; | ||
789 | 778 | ||
790 | return 0; | 779 | return 0; |
791 | } | 780 | } |