aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/inet6_connection_sock.h2
-rw-r--r--include/net/inet_connection_sock.h3
-rw-r--r--include/net/ip.h2
-rw-r--r--net/dccp/output.c4
-rw-r--r--net/ipv4/ip_output.c3
-rw-r--r--net/ipv4/tcp_output.c3
-rw-r--r--net/ipv6/inet6_connection_sock.c3
-rw-r--r--net/sctp/protocol.c2
8 files changed, 10 insertions, 12 deletions
diff --git a/include/net/inet6_connection_sock.h b/include/net/inet6_connection_sock.h
index f13ddc2543b1..16aa96a6a53b 100644
--- a/include/net/inet6_connection_sock.h
+++ b/include/net/inet6_connection_sock.h
@@ -38,5 +38,5 @@ extern void inet6_csk_reqsk_queue_hash_add(struct sock *sk,
38 38
39extern void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); 39extern void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr);
40 40
41extern int inet6_csk_xmit(struct sk_buff *skb, int ipfragok); 41extern int inet6_csk_xmit(struct sk_buff *skb, struct sock *sk, int ipfragok);
42#endif /* _INET6_CONNECTION_SOCK_H */ 42#endif /* _INET6_CONNECTION_SOCK_H */
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index 0bcf9f237e1f..fd3f1d8cdc4a 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -36,7 +36,8 @@ struct tcp_congestion_ops;
36 * (i.e. things that depend on the address family) 36 * (i.e. things that depend on the address family)
37 */ 37 */
38struct inet_connection_sock_af_ops { 38struct inet_connection_sock_af_ops {
39 int (*queue_xmit)(struct sk_buff *skb, int ipfragok); 39 int (*queue_xmit)(struct sk_buff *skb, struct sock *sk,
40 int ipfragok);
40 void (*send_check)(struct sock *sk, int len, 41 void (*send_check)(struct sock *sk, int len,
41 struct sk_buff *skb); 42 struct sk_buff *skb);
42 int (*rebuild_header)(struct sock *sk); 43 int (*rebuild_header)(struct sock *sk);
diff --git a/include/net/ip.h b/include/net/ip.h
index b6d95e553401..949fa8683626 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -97,7 +97,7 @@ extern int ip_mc_output(struct sk_buff *skb);
97extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); 97extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *));
98extern int ip_do_nat(struct sk_buff *skb); 98extern int ip_do_nat(struct sk_buff *skb);
99extern void ip_send_check(struct iphdr *ip); 99extern void ip_send_check(struct iphdr *ip);
100extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok); 100extern int ip_queue_xmit(struct sk_buff *skb, struct sock *sk, int ipfragok);
101extern void ip_init(void); 101extern void ip_init(void);
102extern int ip_append_data(struct sock *sk, 102extern int ip_append_data(struct sock *sk,
103 int getfrag(void *from, char *to, int offset, int len, 103 int getfrag(void *from, char *to, int offset, int len,
diff --git a/net/dccp/output.c b/net/dccp/output.c
index 7102e3aed4ca..2cc4f4b2a9dd 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -125,7 +125,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
125 DCCP_INC_STATS(DCCP_MIB_OUTSEGS); 125 DCCP_INC_STATS(DCCP_MIB_OUTSEGS);
126 126
127 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); 127 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
128 err = icsk->icsk_af_ops->queue_xmit(skb, 0); 128 err = icsk->icsk_af_ops->queue_xmit(skb, sk, 0);
129 if (err <= 0) 129 if (err <= 0)
130 return err; 130 return err;
131 131
@@ -426,7 +426,7 @@ int dccp_send_reset(struct sock *sk, enum dccp_reset_codes code)
426 code); 426 code);
427 if (skb != NULL) { 427 if (skb != NULL) {
428 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); 428 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
429 err = inet_csk(sk)->icsk_af_ops->queue_xmit(skb, 0); 429 err = inet_csk(sk)->icsk_af_ops->queue_xmit(skb, sk, 0);
430 if (err == NET_XMIT_CN) 430 if (err == NET_XMIT_CN)
431 err = 0; 431 err = 0;
432 } 432 }
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 23633bf042ba..def32d8d3b06 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -288,9 +288,8 @@ int ip_output(struct sk_buff *skb)
288 !(IPCB(skb)->flags & IPSKB_REROUTED)); 288 !(IPCB(skb)->flags & IPSKB_REROUTED));
289} 289}
290 290
291int ip_queue_xmit(struct sk_buff *skb, int ipfragok) 291int ip_queue_xmit(struct sk_buff *skb, struct sock *sk, int ipfragok)
292{ 292{
293 struct sock *sk = skb->sk;
294 struct inet_sock *inet = inet_sk(sk); 293 struct inet_sock *inet = inet_sk(sk);
295 struct ip_options *opt = inet->opt; 294 struct ip_options *opt = inet->opt;
296 struct rtable *rt; 295 struct rtable *rt;
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index ca406157724c..f63e99aac2d5 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -426,7 +426,6 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
426 426
427 th = (struct tcphdr *) skb_push(skb, tcp_header_size); 427 th = (struct tcphdr *) skb_push(skb, tcp_header_size);
428 skb->h.th = th; 428 skb->h.th = th;
429 skb_set_owner_w(skb, sk);
430 429
431 /* Build TCP header and checksum it. */ 430 /* Build TCP header and checksum it. */
432 th->source = inet->sport; 431 th->source = inet->sport;
@@ -479,7 +478,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
479 if (after(tcb->end_seq, tp->snd_nxt) || tcb->seq == tcb->end_seq) 478 if (after(tcb->end_seq, tp->snd_nxt) || tcb->seq == tcb->end_seq)
480 TCP_INC_STATS(TCP_MIB_OUTSEGS); 479 TCP_INC_STATS(TCP_MIB_OUTSEGS);
481 480
482 err = icsk->icsk_af_ops->queue_xmit(skb, 0); 481 err = icsk->icsk_af_ops->queue_xmit(skb, sk, 0);
483 if (likely(err <= 0)) 482 if (likely(err <= 0))
484 return err; 483 return err;
485 484
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index e48fb4c53c4f..c598962eaa40 100644
--- a/net/ipv6/inet6_connection_sock.c
+++ b/net/ipv6/inet6_connection_sock.c
@@ -139,9 +139,8 @@ void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr * uaddr)
139 139
140EXPORT_SYMBOL_GPL(inet6_csk_addr2sockaddr); 140EXPORT_SYMBOL_GPL(inet6_csk_addr2sockaddr);
141 141
142int inet6_csk_xmit(struct sk_buff *skb, int ipfragok) 142int inet6_csk_xmit(struct sk_buff *skb, struct sock *sk, int ipfragok)
143{ 143{
144 struct sock *sk = skb->sk;
145 struct inet_sock *inet = inet_sk(sk); 144 struct inet_sock *inet = inet_sk(sk);
146 struct ipv6_pinfo *np = inet6_sk(sk); 145 struct ipv6_pinfo *np = inet6_sk(sk);
147 struct flowi fl; 146 struct flowi fl;
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 5b4f82fd98f8..c107d45f6e65 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -808,7 +808,7 @@ static inline int sctp_v4_xmit(struct sk_buff *skb,
808 NIPQUAD(((struct rtable *)skb->dst)->rt_dst)); 808 NIPQUAD(((struct rtable *)skb->dst)->rt_dst));
809 809
810 SCTP_INC_STATS(SCTP_MIB_OUTSCTPPACKS); 810 SCTP_INC_STATS(SCTP_MIB_OUTSCTPPACKS);
811 return ip_queue_xmit(skb, ipfragok); 811 return ip_queue_xmit(skb, skb->sk, ipfragok);
812} 812}
813 813
814static struct sctp_af sctp_ipv4_specific; 814static struct sctp_af sctp_ipv4_specific;