[RFC]: IPv4 mroute interface referencing

flat view

From: David Lamparter <hidden>
Date: 2010-02-13 18:54:06

The attached patch introduces a new struct vifctln which is identical to
vifctl except for a new vifi_ifindex field. This allows creating mroute
vifs if you have multiple interfaces with the same IP (i.e.
"unnumbered", PtP interfaces) on your box.

Other ways to support this could be:
* new mroute API
  + it really needs an overhaul anyway
  + netlink would be more appropriate for mroute (IMHO)
  - complicated, non-immediate fix
  - complex user space software rewriting
* new MRT_ADD_VIF_EXT setsockopt
  + a bit more clean
  - not needed really, sockopt mess
* stuff ifindex in lcl_addr field ("0.0.0.ifindex IP")
  + no new struct field
  - idiotic (IMHO) API-monging
  o compatibility gain if BSD did this, but BSD doesn't, no point

* add ifindex field (attached patch does this)
  + compatibility by setsockopt length parameter
  + doesn't break userspace software (none of the existing multicast
    routers tries to pass excess junk)
  - new struct, new struct field

This patch causes userspace-visible changes, but is fully backwards
compatible. Patch is against 2.6.32.8, I will provide an updated one if
discussion is in favour of something I can code up (i.e. not netlink).

Regards,


David

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help