diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/security.h | 59 | ||||
-rw-r--r-- | include/linux/usb/usbnet.h | 1 | ||||
-rw-r--r-- | include/net/ip.h | 2 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_core.h | 2 |
4 files changed, 51 insertions, 13 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index 0f6afc657f77..eee7478cda70 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -989,17 +989,29 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
989 | * tells the LSM to decrement the number of secmark labeling rules loaded | 989 | * tells the LSM to decrement the number of secmark labeling rules loaded |
990 | * @req_classify_flow: | 990 | * @req_classify_flow: |
991 | * Sets the flow's sid to the openreq sid. | 991 | * Sets the flow's sid to the openreq sid. |
992 | * @tun_dev_alloc_security: | ||
993 | * This hook allows a module to allocate a security structure for a TUN | ||
994 | * device. | ||
995 | * @security pointer to a security structure pointer. | ||
996 | * Returns a zero on success, negative values on failure. | ||
997 | * @tun_dev_free_security: | ||
998 | * This hook allows a module to free the security structure for a TUN | ||
999 | * device. | ||
1000 | * @security pointer to the TUN device's security structure | ||
992 | * @tun_dev_create: | 1001 | * @tun_dev_create: |
993 | * Check permissions prior to creating a new TUN device. | 1002 | * Check permissions prior to creating a new TUN device. |
994 | * @tun_dev_post_create: | 1003 | * @tun_dev_attach_queue: |
995 | * This hook allows a module to update or allocate a per-socket security | 1004 | * Check permissions prior to attaching to a TUN device queue. |
996 | * structure. | 1005 | * @security pointer to the TUN device's security structure. |
997 | * @sk contains the newly created sock structure. | ||
998 | * @tun_dev_attach: | 1006 | * @tun_dev_attach: |
999 | * Check permissions prior to attaching to a persistent TUN device. This | 1007 | * This hook can be used by the module to update any security state |
1000 | * hook can also be used by the module to update any security state | ||
1001 | * associated with the TUN device's sock structure. | 1008 | * associated with the TUN device's sock structure. |
1002 | * @sk contains the existing sock structure. | 1009 | * @sk contains the existing sock structure. |
1010 | * @security pointer to the TUN device's security structure. | ||
1011 | * @tun_dev_open: | ||
1012 | * This hook can be used by the module to update any security state | ||
1013 | * associated with the TUN device's security structure. | ||
1014 | * @security pointer to the TUN devices's security structure. | ||
1003 | * | 1015 | * |
1004 | * Security hooks for XFRM operations. | 1016 | * Security hooks for XFRM operations. |
1005 | * | 1017 | * |
@@ -1620,9 +1632,12 @@ struct security_operations { | |||
1620 | void (*secmark_refcount_inc) (void); | 1632 | void (*secmark_refcount_inc) (void); |
1621 | void (*secmark_refcount_dec) (void); | 1633 | void (*secmark_refcount_dec) (void); |
1622 | void (*req_classify_flow) (const struct request_sock *req, struct flowi *fl); | 1634 | void (*req_classify_flow) (const struct request_sock *req, struct flowi *fl); |
1623 | int (*tun_dev_create)(void); | 1635 | int (*tun_dev_alloc_security) (void **security); |
1624 | void (*tun_dev_post_create)(struct sock *sk); | 1636 | void (*tun_dev_free_security) (void *security); |
1625 | int (*tun_dev_attach)(struct sock *sk); | 1637 | int (*tun_dev_create) (void); |
1638 | int (*tun_dev_attach_queue) (void *security); | ||
1639 | int (*tun_dev_attach) (struct sock *sk, void *security); | ||
1640 | int (*tun_dev_open) (void *security); | ||
1626 | #endif /* CONFIG_SECURITY_NETWORK */ | 1641 | #endif /* CONFIG_SECURITY_NETWORK */ |
1627 | 1642 | ||
1628 | #ifdef CONFIG_SECURITY_NETWORK_XFRM | 1643 | #ifdef CONFIG_SECURITY_NETWORK_XFRM |
@@ -2566,9 +2581,12 @@ void security_inet_conn_established(struct sock *sk, | |||
2566 | int security_secmark_relabel_packet(u32 secid); | 2581 | int security_secmark_relabel_packet(u32 secid); |
2567 | void security_secmark_refcount_inc(void); | 2582 | void security_secmark_refcount_inc(void); |
2568 | void security_secmark_refcount_dec(void); | 2583 | void security_secmark_refcount_dec(void); |
2584 | int security_tun_dev_alloc_security(void **security); | ||
2585 | void security_tun_dev_free_security(void *security); | ||
2569 | int security_tun_dev_create(void); | 2586 | int security_tun_dev_create(void); |
2570 | void security_tun_dev_post_create(struct sock *sk); | 2587 | int security_tun_dev_attach_queue(void *security); |
2571 | int security_tun_dev_attach(struct sock *sk); | 2588 | int security_tun_dev_attach(struct sock *sk, void *security); |
2589 | int security_tun_dev_open(void *security); | ||
2572 | 2590 | ||
2573 | #else /* CONFIG_SECURITY_NETWORK */ | 2591 | #else /* CONFIG_SECURITY_NETWORK */ |
2574 | static inline int security_unix_stream_connect(struct sock *sock, | 2592 | static inline int security_unix_stream_connect(struct sock *sock, |
@@ -2733,16 +2751,31 @@ static inline void security_secmark_refcount_dec(void) | |||
2733 | { | 2751 | { |
2734 | } | 2752 | } |
2735 | 2753 | ||
2754 | static inline int security_tun_dev_alloc_security(void **security) | ||
2755 | { | ||
2756 | return 0; | ||
2757 | } | ||
2758 | |||
2759 | static inline void security_tun_dev_free_security(void *security) | ||
2760 | { | ||
2761 | } | ||
2762 | |||
2736 | static inline int security_tun_dev_create(void) | 2763 | static inline int security_tun_dev_create(void) |
2737 | { | 2764 | { |
2738 | return 0; | 2765 | return 0; |
2739 | } | 2766 | } |
2740 | 2767 | ||
2741 | static inline void security_tun_dev_post_create(struct sock *sk) | 2768 | static inline int security_tun_dev_attach_queue(void *security) |
2769 | { | ||
2770 | return 0; | ||
2771 | } | ||
2772 | |||
2773 | static inline int security_tun_dev_attach(struct sock *sk, void *security) | ||
2742 | { | 2774 | { |
2775 | return 0; | ||
2743 | } | 2776 | } |
2744 | 2777 | ||
2745 | static inline int security_tun_dev_attach(struct sock *sk) | 2778 | static inline int security_tun_dev_open(void *security) |
2746 | { | 2779 | { |
2747 | return 0; | 2780 | return 0; |
2748 | } | 2781 | } |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index bd45eb7bedc8..5de7a220e986 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -100,6 +100,7 @@ struct driver_info { | |||
100 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ | 100 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ |
101 | 101 | ||
102 | #define FLAG_POINTTOPOINT 0x1000 /* possibly use "usb%d" names */ | 102 | #define FLAG_POINTTOPOINT 0x1000 /* possibly use "usb%d" names */ |
103 | #define FLAG_NOARP 0x2000 /* device can't do ARP */ | ||
103 | 104 | ||
104 | /* | 105 | /* |
105 | * Indicates to usbnet, that USB driver accumulates multiple IP packets. | 106 | * Indicates to usbnet, that USB driver accumulates multiple IP packets. |
diff --git a/include/net/ip.h b/include/net/ip.h index 0707fb9551aa..a68f838a132c 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -143,6 +143,8 @@ static inline struct sk_buff *ip_finish_skb(struct sock *sk, struct flowi4 *fl4) | |||
143 | extern int ip4_datagram_connect(struct sock *sk, | 143 | extern int ip4_datagram_connect(struct sock *sk, |
144 | struct sockaddr *uaddr, int addr_len); | 144 | struct sockaddr *uaddr, int addr_len); |
145 | 145 | ||
146 | extern void ip4_datagram_release_cb(struct sock *sk); | ||
147 | |||
146 | struct ip_reply_arg { | 148 | struct ip_reply_arg { |
147 | struct kvec iov[1]; | 149 | struct kvec iov[1]; |
148 | int flags; | 150 | int flags; |
diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h index d8f5b9f52169..e98aeb3da033 100644 --- a/include/net/netfilter/nf_conntrack_core.h +++ b/include/net/netfilter/nf_conntrack_core.h | |||
@@ -31,6 +31,8 @@ extern void nf_conntrack_cleanup(struct net *net); | |||
31 | extern int nf_conntrack_proto_init(struct net *net); | 31 | extern int nf_conntrack_proto_init(struct net *net); |
32 | extern void nf_conntrack_proto_fini(struct net *net); | 32 | extern void nf_conntrack_proto_fini(struct net *net); |
33 | 33 | ||
34 | extern void nf_conntrack_cleanup_end(void); | ||
35 | |||
34 | extern bool | 36 | extern bool |
35 | nf_ct_get_tuple(const struct sk_buff *skb, | 37 | nf_ct_get_tuple(const struct sk_buff *skb, |
36 | unsigned int nhoff, | 38 | unsigned int nhoff, |