aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/mcast.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>2013-01-13 00:02:18 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-13 20:17:14 -0500
commitdaad151263cf334d57fcc0270e2483d4b4639650 (patch)
treeca0ba6274d94c1ce31a51a296a7032bb43a1cc08 /net/ipv6/mcast.c
parente7219858ac1f98213a4714d0e24e7a003e1bf6a2 (diff)
ipv6: Make ipv6_is_mld() inline and use it from ip6_mc_input().
Move generalized version of ipv6_is_mld() to header, and use it from ip6_mc_input(). Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/mcast.c')
-rw-r--r--net/ipv6/mcast.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 28dfa5f3801f..8237ee15eafd 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -935,33 +935,6 @@ int ipv6_dev_mc_dec(struct net_device *dev, const struct in6_addr *addr)
935} 935}
936 936
937/* 937/*
938 * identify MLD packets for MLD filter exceptions
939 */
940bool ipv6_is_mld(struct sk_buff *skb, int nexthdr)
941{
942 struct icmp6hdr *pic;
943
944 if (nexthdr != IPPROTO_ICMPV6)
945 return false;
946
947 if (!pskb_may_pull(skb, sizeof(struct icmp6hdr)))
948 return false;
949
950 pic = icmp6_hdr(skb);
951
952 switch (pic->icmp6_type) {
953 case ICMPV6_MGM_QUERY:
954 case ICMPV6_MGM_REPORT:
955 case ICMPV6_MGM_REDUCTION:
956 case ICMPV6_MLD2_REPORT:
957 return true;
958 default:
959 break;
960 }
961 return false;
962}
963
964/*
965 * check if the interface/address pair is valid 938 * check if the interface/address pair is valid
966 */ 939 */
967bool ipv6_chk_mcast_addr(struct net_device *dev, const struct in6_addr *group, 940bool ipv6_chk_mcast_addr(struct net_device *dev, const struct in6_addr *group,