From: YOSHIFUJI Hideaki <hideaki.yoshifuji@miraclelinux.com>
To: Madhu Challa <challa@noironetworks.com>, netdev@vger.kernel.org
Cc: eric.dumazet@gmail.com, davem@davemloft.net,
hideaki.yoshifuji@miraclelinux.com
Subject: Re: [PATCH net-next v3 2/2] multicast: Extend ip address command to enable multicast group join/leave on IP level.
Date: Mon, 23 Feb 2015 16:44:09 +0900 [thread overview]
Message-ID: <54EADA49.6020308@miraclelinux.com> (raw)
In-Reply-To: <1424672814-2998-3-git-send-email-challa@noironetworks.com>
Hi,
Madhu Challa wrote:
> diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
> index 3a8985c..ee56730 100644
> --- a/net/ipv4/devinet.c
> +++ b/net/ipv4/devinet.c
> @@ -838,6 +864,16 @@ static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh)
> * userspace already relies on not having to provide this.
> */
> set_ifa_lifetime(ifa, valid_lft, prefered_lft);
> + if (ifa->ifa_flags & IFA_F_MCAUTOJOIN) {
> + WARN_ON(!ipv4_is_multicast(ifa->ifa_address));
> + ret = ip_mc_config(net->ipv4.mc_autojoin_sock,
> + true, ifa->ifa_address,
> + ifa->ifa_dev->dev->ifindex);
> + if (ret < 0) {
> + inet_free_ifa(ifa);
> + return ret;
> + }
> + }
No WARN_ON() here, please.
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index 98e4a63..b9b6d52 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -2501,6 +2519,14 @@ static int inet6_addr_add(struct net *net, int ifindex,
> if (IS_ERR(idev))
> return PTR_ERR(idev);
>
> + if (ifa_flags & IFA_F_MCAUTOJOIN) {
> + WARN_ON(!ipv6_addr_is_multicast(pfx));
> + ret = ipv6_mc_config(net->ipv6.mc_autojoin_sock,
> + true, pfx, ifindex);
> + if (ret < 0)
> + return ret;
> + }
> +
> scope = ipv6_addr_scope(pfx);
>
> timeout = addrconf_timeout_fixup(valid_lft, HZ);
ditto.
--
Hideaki Yoshifuji <hideaki.yoshifuji@miraclelinux.com>
Technical Division, MIRACLE LINUX CORPORATION
next prev parent reply other threads:[~2015-02-23 7:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-23 6:26 [PATCH net-next v3 0/2] Multicast group join/leave at ip level Madhu Challa
2015-02-23 6:26 ` [PATCH net-next v3 1/2] igmp v6: add __ipv6_sock_mc_join and __ipv6_sock_mc_drop Madhu Challa
2015-02-23 15:16 ` Eric Dumazet
2015-02-23 6:26 ` [PATCH net-next v3 2/2] multicast: Extend ip address command to enable multicast group join/leave on IP level Madhu Challa
2015-02-23 7:44 ` YOSHIFUJI Hideaki [this message]
2015-02-23 7:55 ` Madhu Challa
2015-02-23 8:45 ` Erik Hugne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54EADA49.6020308@miraclelinux.com \
--to=hideaki.yoshifuji@miraclelinux.com \
--cc=challa@noironetworks.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.