@@ -83,7 +83,7 @@ static int sctp_add_backlog(struct sock *sk, struct sk_buff *skb);
8383
8484
8585/* Calculate the SCTP checksum of an SCTP packet. */
86- static inline int sctp_rcv_checksum (struct sk_buff * skb )
86+ static inline int sctp_rcv_checksum (struct net * net , struct sk_buff * skb )
8787{
8888 struct sctphdr * sh = sctp_hdr (skb );
8989 __le32 cmp = sh -> checksum ;
@@ -99,7 +99,7 @@ static inline int sctp_rcv_checksum(struct sk_buff *skb)
9999
100100 if (val != cmp ) {
101101 /* CRC failure, dump it. */
102- SCTP_INC_STATS_BH (SCTP_MIB_CHECKSUMERRORS );
102+ SCTP_INC_STATS_BH (net , SCTP_MIB_CHECKSUMERRORS );
103103 return -1 ;
104104 }
105105 return 0 ;
@@ -137,7 +137,7 @@ int sctp_rcv(struct sk_buff *skb)
137137 if (skb -> pkt_type != PACKET_HOST )
138138 goto discard_it ;
139139
140- SCTP_INC_STATS_BH (SCTP_MIB_INSCTPPACKS );
140+ SCTP_INC_STATS_BH (net , SCTP_MIB_INSCTPPACKS );
141141
142142 if (skb_linearize (skb ))
143143 goto discard_it ;
@@ -149,7 +149,7 @@ int sctp_rcv(struct sk_buff *skb)
149149 if (skb -> len < sizeof (struct sctphdr ))
150150 goto discard_it ;
151151 if (!sctp_checksum_disable && !skb_csum_unnecessary (skb ) &&
152- sctp_rcv_checksum (skb ) < 0 )
152+ sctp_rcv_checksum (net , skb ) < 0 )
153153 goto discard_it ;
154154
155155 skb_pull (skb , sizeof (struct sctphdr ));
@@ -220,7 +220,7 @@ int sctp_rcv(struct sk_buff *skb)
220220 */
221221 if (!asoc ) {
222222 if (sctp_rcv_ootb (skb )) {
223- SCTP_INC_STATS_BH (SCTP_MIB_OUTOFBLUES );
223+ SCTP_INC_STATS_BH (net , SCTP_MIB_OUTOFBLUES );
224224 goto discard_release ;
225225 }
226226 }
@@ -276,9 +276,9 @@ int sctp_rcv(struct sk_buff *skb)
276276 skb = NULL ; /* sctp_chunk_free already freed the skb */
277277 goto discard_release ;
278278 }
279- SCTP_INC_STATS_BH (SCTP_MIB_IN_PKT_BACKLOG );
279+ SCTP_INC_STATS_BH (net , SCTP_MIB_IN_PKT_BACKLOG );
280280 } else {
281- SCTP_INC_STATS_BH (SCTP_MIB_IN_PKT_SOFTIRQ );
281+ SCTP_INC_STATS_BH (net , SCTP_MIB_IN_PKT_SOFTIRQ );
282282 sctp_inq_push (& chunk -> rcvr -> inqueue , chunk );
283283 }
284284
@@ -293,7 +293,7 @@ int sctp_rcv(struct sk_buff *skb)
293293 return 0 ;
294294
295295discard_it :
296- SCTP_INC_STATS_BH (SCTP_MIB_IN_PKT_DISCARDS );
296+ SCTP_INC_STATS_BH (net , SCTP_MIB_IN_PKT_DISCARDS );
297297 kfree_skb (skb );
298298 return 0 ;
299299
@@ -543,7 +543,7 @@ struct sock *sctp_err_lookup(struct net *net, int family, struct sk_buff *skb,
543543 * servers this needs to be solved differently.
544544 */
545545 if (sock_owned_by_user (sk ))
546- NET_INC_STATS_BH (& init_net , LINUX_MIB_LOCKDROPPEDICMPS );
546+ NET_INC_STATS_BH (net , LINUX_MIB_LOCKDROPPEDICMPS );
547547
548548 * app = asoc ;
549549 * tpp = transport ;
@@ -593,7 +593,7 @@ void sctp_v4_err(struct sk_buff *skb, __u32 info)
593593 struct net * net = dev_net (skb -> dev );
594594
595595 if (skb -> len < ihlen + 8 ) {
596- ICMP_INC_STATS_BH (& init_net , ICMP_MIB_INERRORS );
596+ ICMP_INC_STATS_BH (net , ICMP_MIB_INERRORS );
597597 return ;
598598 }
599599
@@ -607,7 +607,7 @@ void sctp_v4_err(struct sk_buff *skb, __u32 info)
607607 skb -> network_header = saveip ;
608608 skb -> transport_header = savesctp ;
609609 if (!sk ) {
610- ICMP_INC_STATS_BH (& init_net , ICMP_MIB_INERRORS );
610+ ICMP_INC_STATS_BH (net , ICMP_MIB_INERRORS );
611611 return ;
612612 }
613613 /* Warning: The sock lock is held. Remember to call
0 commit comments