diff options
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 37a1ecd9d600..cd975743bcd2 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -5,8 +5,6 @@ | |||
5 | * | 5 | * |
6 | * RAW - implementation of IP "raw" sockets. | 6 | * RAW - implementation of IP "raw" sockets. |
7 | * | 7 | * |
8 | * Version: $Id: raw.c,v 1.64 2002/02/01 22:01:04 davem Exp $ | ||
9 | * | ||
10 | * Authors: Ross Biro | 8 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 9 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * | 10 | * |
@@ -322,6 +320,7 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length, | |||
322 | unsigned int flags) | 320 | unsigned int flags) |
323 | { | 321 | { |
324 | struct inet_sock *inet = inet_sk(sk); | 322 | struct inet_sock *inet = inet_sk(sk); |
323 | struct net *net = sock_net(sk); | ||
325 | struct iphdr *iph; | 324 | struct iphdr *iph; |
326 | struct sk_buff *skb; | 325 | struct sk_buff *skb; |
327 | unsigned int iphlen; | 326 | unsigned int iphlen; |
@@ -370,7 +369,7 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length, | |||
370 | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); | 369 | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
371 | } | 370 | } |
372 | if (iph->protocol == IPPROTO_ICMP) | 371 | if (iph->protocol == IPPROTO_ICMP) |
373 | icmp_out_count(((struct icmphdr *) | 372 | icmp_out_count(net, ((struct icmphdr *) |
374 | skb_transport_header(skb))->type); | 373 | skb_transport_header(skb))->type); |
375 | 374 | ||
376 | err = NF_HOOK(PF_INET, NF_INET_LOCAL_OUT, skb, NULL, rt->u.dst.dev, | 375 | err = NF_HOOK(PF_INET, NF_INET_LOCAL_OUT, skb, NULL, rt->u.dst.dev, |
@@ -386,7 +385,7 @@ error_fault: | |||
386 | err = -EFAULT; | 385 | err = -EFAULT; |
387 | kfree_skb(skb); | 386 | kfree_skb(skb); |
388 | error: | 387 | error: |
389 | IP_INC_STATS(IPSTATS_MIB_OUTDISCARDS); | 388 | IP_INC_STATS(net, IPSTATS_MIB_OUTDISCARDS); |
390 | return err; | 389 | return err; |
391 | } | 390 | } |
392 | 391 | ||
@@ -608,12 +607,11 @@ static void raw_close(struct sock *sk, long timeout) | |||
608 | sk_common_release(sk); | 607 | sk_common_release(sk); |
609 | } | 608 | } |
610 | 609 | ||
611 | static int raw_destroy(struct sock *sk) | 610 | static void raw_destroy(struct sock *sk) |
612 | { | 611 | { |
613 | lock_sock(sk); | 612 | lock_sock(sk); |
614 | ip_flush_pending_frames(sk); | 613 | ip_flush_pending_frames(sk); |
615 | release_sock(sk); | 614 | release_sock(sk); |
616 | return 0; | ||
617 | } | 615 | } |
618 | 616 | ||
619 | /* This gets rid of all the nasties in af_inet. -DaveM */ | 617 | /* This gets rid of all the nasties in af_inet. -DaveM */ |
@@ -947,7 +945,7 @@ static int raw_seq_show(struct seq_file *seq, void *v) | |||
947 | if (v == SEQ_START_TOKEN) | 945 | if (v == SEQ_START_TOKEN) |
948 | seq_printf(seq, " sl local_address rem_address st tx_queue " | 946 | seq_printf(seq, " sl local_address rem_address st tx_queue " |
949 | "rx_queue tr tm->when retrnsmt uid timeout " | 947 | "rx_queue tr tm->when retrnsmt uid timeout " |
950 | "inode drops\n"); | 948 | "inode ref pointer drops\n"); |
951 | else | 949 | else |
952 | raw_sock_seq_show(seq, v, raw_seq_private(seq)->bucket); | 950 | raw_sock_seq_show(seq, v, raw_seq_private(seq)->bucket); |
953 | return 0; | 951 | return 0; |