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]
Date:	Thu, 27 Aug 2009 02:53:18 +0300
From:	Octavian Purdila <opurdila@...acom.com>
To:	"Ilia K." <mail4ilia@...il.com>
Cc:	netdev@...r.kernel.org
Subject: Re: multicast routing and multiple interfaces with same IP

On Wednesday 12 August 2009 02:26:21 Ilia K. wrote:
> Hi All,
> When routing daemon wants to enable forwarding of multicast traffic it
> performs something like:
>
> 	struct vifctl vc = {
> 		.vifc_vifi  = 1,
> 		.vifc_flags = 0,
> 		.vifc_threshold = 1,
> 		.vifc_rate_limit = 0,
> 		.vifc_lcl_addr = ip, /* <--- ip address of physical interface, e.g. eth0
> */ .vifc_rmt_addr.s_addr = htonl(INADDR_ANY),
> 	  };
> 	setsockopt(fd, IPPROTO_IP, MRT_ADD_VIF, &vc, sizeof(vc));
>
> This leads (in the kernel) to call to vif_add() function call which
> search the (physical) device using assigned IP address:
> 	dev = ip_dev_find(net, vifc->vifc_lcl_addr.s_addr);
>
> It seems like API (struct vifctl) does not allow to specify an
> interface other way than using it's IP, and if there are more than a
> single interface with specified IP only the first one will be found
> (for example it makes problems when tunnel is configured using the
> same IP as underlying interface).
>
> Am I correct in identifying the problem?
> I can propose the attached patch against 2.6.30.4.
>

Hi Ilia,

I don't have context on multicast routing, but this caught my attention:

>@@ -61,11 +61,13 @@ 
> 	unsigned int vifc_rate_limit;	/* Rate limiter values (NI) */
> 	struct in_addr vifc_lcl_addr;	/* Our address */
> 	struct in_addr vifc_rmt_addr;	/* IPIP tunnel addr */
>+	int ifindex;			/* Local interface index */
> };
>

Wouldn't this break userspace ABI? 

Perhaps you could use a union between vifc_lcl_addr and vifc_ifindex, they seem 
to be exclusive.

tavi

--
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