aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/igmp.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 994648be80ab..732cd07e6071 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -922,13 +922,11 @@ int igmp_rcv(struct sk_buff *skb)
922 struct in_device *in_dev = in_dev_get(skb->dev); 922 struct in_device *in_dev = in_dev_get(skb->dev);
923 int len = skb->len; 923 int len = skb->len;
924 924
925 if (in_dev==NULL) { 925 if (in_dev == NULL)
926 kfree_skb(skb); 926 goto drop;
927 return 0;
928 }
929 927
930 if (!pskb_may_pull(skb, sizeof(struct igmphdr))) 928 if (!pskb_may_pull(skb, sizeof(struct igmphdr)))
931 goto drop; 929 goto drop_ref;
932 930
933 switch (skb->ip_summed) { 931 switch (skb->ip_summed) {
934 case CHECKSUM_COMPLETE: 932 case CHECKSUM_COMPLETE:
@@ -938,7 +936,7 @@ int igmp_rcv(struct sk_buff *skb)
938 case CHECKSUM_NONE: 936 case CHECKSUM_NONE:
939 skb->csum = 0; 937 skb->csum = 0;
940 if (__skb_checksum_complete(skb)) 938 if (__skb_checksum_complete(skb))
941 goto drop; 939 goto drop_ref;
942 } 940 }
943 941
944 ih = igmp_hdr(skb); 942 ih = igmp_hdr(skb);
@@ -972,8 +970,9 @@ int igmp_rcv(struct sk_buff *skb)
972 break; 970 break;
973 } 971 }
974 972
975drop: 973drop_ref:
976 in_dev_put(in_dev); 974 in_dev_put(in_dev);
975drop:
977 kfree_skb(skb); 976 kfree_skb(skb);
978 return 0; 977 return 0;
979} 978}