lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130627183342.4b9c5598@nehalam.linuxnetplumber.net>
Date:	Thu, 27 Jun 2013 18:33:42 -0700
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	Hannes Frederic Sowa <hannes@...essinduktion.org>
Cc:	Sven-Thorsten Dietrich <sven@...tta.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Stephen Hemminger <shemminger@...tta.com>,
	"nicolas.dichtel@...nd.com" <nicolas.dichtel@...nd.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Mike Davison <Mike.Davison@...tta.com>
Subject: Re: [PATCH] Set the correct RTNL family for multicast netconf
 messages

On Fri, 28 Jun 2013 03:23:07 +0200
Hannes Frederic Sowa <hannes@...essinduktion.org> wrote:

> On Thu, Jun 27, 2013 at 04:44:47PM -0700, Sven-Thorsten Dietrich wrote:
> > diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
> > index dfc39d4..695858b 100644
> > --- a/net/ipv4/devinet.c
> > +++ b/net/ipv4/devinet.c
> > @@ -1705,7 +1705,16 @@ static int inet_netconf_fill_devconf(struct sk_buff *skb, int ifindex,
> >  		return -EMSGSIZE;
> >  
> >  	ncm = nlmsg_data(nlh);
> > -	ncm->ncm_family = AF_INET;
> > +
> > +	switch (type) {
> > +		case NETCONFA_MC_FORWARDING:
> > +			ncm->ncm_family = RTNL_FAMILY_IPMR;
> > +			break;
> > +
> > +		default:
> > +			ncm->ncm_family = AF_INET;
> > +			break;
> > +	}
> >  
> >  	if (nla_put_s32(skb, NETCONFA_IFINDEX, ifindex) < 0)
> >  		goto nla_put_failure;
> > diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> > index 4ab4c38..a177da4 100644
> > --- a/net/ipv6/addrconf.c
> > +++ b/net/ipv6/addrconf.c
> > @@ -492,7 +492,16 @@ static int inet6_netconf_fill_devconf(struct sk_buff *skb, int ifindex,
> >  		return -EMSGSIZE;
> >  
> >  	ncm = nlmsg_data(nlh);
> > -	ncm->ncm_family = AF_INET6;
> > +
> > +	switch (type) {
> > +		case NETCONFA_MC_FORWARDING:
> > +			ncm->ncm_family = RTNL_FAMILY_IP6MR;
> > +			break;
> > +
> > +		default:
> > +			ncm->ncm_family = AF_INET6;
> > +			break;
> > +	}
> >  
> 
> Hm, are you sure? NETCONFA_MC_FORWARDING is of type RTM_NEWNETCONF
> and expects ncm_family to be either AF_INET or AF_INET6 (at least in
> iproute2/ipmonitor.c).
> 

I agree with Sven on this, looks like the recent addition of netconf
configuration to netlink didn't embrace how multicast is handled in kernel.

Multicast forwarding is a routing related configuration value.
All the multicast routing events come in as special family RTNL_FAMILY_IPMR
(see net/ipv4/ipmr.c function ipmr_fill_route). I would expect that multicast
routing daemons would like to be able to use special family to listen for
all multicast related changes (and not see non-multicast events).


Minor nit: the patch is formatted incorrectly (case should line up with switch).
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ