diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/netfilter_bridge.h | 5 | ||||
| -rw-r--r-- | include/linux/tcp.h | 5 | ||||
| -rw-r--r-- | include/net/sctp/sctp.h | 1 | ||||
| -rw-r--r-- | include/net/sock.h | 19 | ||||
| -rw-r--r-- | include/net/xfrm.h | 2 |
5 files changed, 8 insertions, 24 deletions
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index 88cc98af2dce..a6531bb097ca 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h @@ -71,12 +71,10 @@ static inline void nf_bridge_maybe_copy_header(struct sk_buff *skb) { if (skb->nf_bridge) { -#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) if (skb->protocol == __constant_htons(ETH_P_8021Q)) { memcpy(skb->data - 18, skb->nf_bridge->hh, 18); skb_push(skb, 4); } else -#endif memcpy(skb->data - 16, skb->nf_bridge->hh, 16); } } @@ -86,10 +84,9 @@ void nf_bridge_save_header(struct sk_buff *skb) { int header_size = 16; -#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) if (skb->protocol == __constant_htons(ETH_P_8021Q)) header_size = 18; -#endif + memcpy(skb->nf_bridge->hh, skb->data - header_size, header_size); } diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 3a2e7bf3c44a..d25e5bd21c4d 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@ -386,7 +386,10 @@ struct tcp_sock { struct tcp_opt tcp; }; -#define tcp_sk(__sk) (&((struct tcp_sock *)__sk)->tcp) +static inline struct tcp_opt * tcp_sk(const struct sock *__sk) +{ + return &((struct tcp_sock *)__sk)->tcp; +} #endif diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index bf33562cd101..7edb15d6561a 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -90,7 +90,6 @@ #include <net/snmp.h> #include <net/sctp/structs.h> #include <net/sctp/constants.h> -#include <net/sctp/sm.h> /* Set SCTP_DEBUG flag via config if not already set. */ diff --git a/include/net/sock.h b/include/net/sock.h index ac2eccb7ff9a..1d85a3e5a3cc 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -542,24 +542,9 @@ static inline struct inode *SOCK_INODE(struct socket *socket) extern void __lock_sock(struct sock *sk); extern void __release_sock(struct sock *sk); #define sock_owned_by_user(sk) ((sk)->sk_lock.owner) -#define lock_sock(__sk) \ -do { might_sleep(); \ - spin_lock_bh(&((__sk)->sk_lock.slock)); \ - if ((__sk)->sk_lock.owner) \ - __lock_sock(__sk); \ - (__sk)->sk_lock.owner = (void *)1; \ - spin_unlock_bh(&((__sk)->sk_lock.slock)); \ -} while(0) -#define release_sock(__sk) \ -do { spin_lock_bh(&((__sk)->sk_lock.slock)); \ - if ((__sk)->sk_backlog.tail) \ - __release_sock(__sk); \ - (__sk)->sk_lock.owner = NULL; \ - if (waitqueue_active(&((__sk)->sk_lock.wq))) \ - wake_up(&((__sk)->sk_lock.wq)); \ - spin_unlock_bh(&((__sk)->sk_lock.slock)); \ -} while(0) +extern void lock_sock(struct sock *sk); +extern void release_sock(struct sock *sk); /* BH context may only use the following locking interface. */ #define bh_lock_sock(__sk) spin_lock(&((__sk)->sk_lock.slock)) diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 2ae391720d4d..67072071aec1 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -860,7 +860,7 @@ extern void xfrm_policy_flush(void); extern void xfrm_policy_kill(struct xfrm_policy *); extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); extern struct xfrm_policy *xfrm_sk_policy_lookup(struct sock *sk, int dir, struct flowi *fl); -extern int xfrm_flush_bundles(struct xfrm_state *x); +extern int xfrm_flush_bundles(void); extern wait_queue_head_t km_waitq; extern void km_state_expired(struct xfrm_state *x, int hard); |
