From: Octavian Purdila <opurdila@ixiacom.com>
To: "Ilia K." <mail4ilia@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: multicast routing and multiple interfaces with same IP
Date: Thu, 27 Aug 2009 02:53:18 +0300 [thread overview]
Message-ID: <200908270253.19132.opurdila@ixiacom.com> (raw)
In-Reply-To: <1b9338490908111626j55b49177q71b8a373b6e6381b@mail.gmail.com>
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
next prev parent reply other threads:[~2009-08-26 23:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-11 23:26 multicast routing and multiple interfaces with same IP Ilia K.
2009-08-26 23:53 ` Octavian Purdila [this message]
2009-08-29 7:01 ` David Miller
2009-09-07 15:35 ` Ilia K.
2009-09-07 16:25 ` Octavian Purdila
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=200908270253.19132.opurdila@ixiacom.com \
--to=opurdila@ixiacom.com \
--cc=mail4ilia@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox