Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source CIDR/mask, ranges, support in multicast rules #81

Closed
gedl opened this issue Aug 29, 2017 · 6 comments
Closed

Source CIDR/mask, ranges, support in multicast rules #81

gedl opened this issue Aug 29, 2017 · 6 comments
Milestone

Comments

@gedl
Copy link

gedl commented Aug 29, 2017

I tried to look around open and old issues, but couldn't find any reference to this.

I would like to specify a rule to include multiple hosts. Let's take the following as an example:

smcroute -a i1 172.20.2.2 239.255.255.250 i2

I need this rule to be repeated for a number of source IPs. Let's say I can specified this range of IPs as 172.20.2.2/24.

Is there any way of specifying a CIDDR or a range or a mask when adding a rule to smcroute? The companion iptables (mangle table) to increment the TTL is easy, but couldn't find one for smcroute.

Basically I need to send multicast from IPs 172.20.2.0.0 - 172.20.2.0.255 coming from it1 to 239.255.255.250 through i2

Am I missing something ?

@troglobit
Copy link
Owner

You're not missing anything.

The feature you're looking for is not available yet. I recently added support for destination group ranges. Adding support for source/sender ranges should be fairly simple.

It is worth noting, however, that there is limited kernel support for these features so SMCRoute has to basically create single one-to-one mappings to feed the kernel.

@troglobit troglobit changed the title Ciddr / mask when specifying rules Source CIDR/mask, ranges, support in multicast rules Aug 29, 2017
@gedl
Copy link
Author

gedl commented Aug 29, 2017

Understood, that's what I'm doing right now: my setup script loops through each address and issues a smcroute -a command for each IP in the specified range.

@troglobit troglobit added this to the v2.5 milestone Oct 26, 2018
@kylex2
Copy link
Contributor

kylex2 commented Feb 27, 2019

First, thanks for making SMCRoute!
I wanted to try these kind of routes so I had a go at the source code. I am sure I have missed stuff so any comments are welcome.

@troglobit
Copy link
Owner

@kylex2 There are lot's of unrelated changes in that patch (whitespace, changes to log messages) that would not be accepted in a pull request. However, in general your patch looks set to cover the basics of what op wanted.

I cannot comment more without downloading and testing it, but I'd like to request you do a formal pull request for that. In which case I'd very much like you to split up the changes into logically separate commits and not include unrelated changes. We can also do a proper code audit in the PR, but as a heads-up, the first strchr() can segfault since source may be NULL.

@troglobit
Copy link
Owner

This is now fixed and on master for the v2.5 release thanks to the awesome work of @kylex2 :-)

@troglobit
Copy link
Owner

Also, we'd greatly appreciate all feedback and testing of this you guys can contribute with. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants