[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1b9338490908111626j55b49177q71b8a373b6e6381b@mail.gmail.com>
Date: Wed, 12 Aug 2009 02:26:21 +0300
From: "Ilia K." <mail4ilia@...il.com>
To: netdev@...r.kernel.org
Subject: multicast routing and multiple interfaces with same IP
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.
Regards,
Ilia.
View attachment "vif_add.patch" of type "text/x-diff" (1174 bytes)
Powered by blists - more mailing lists