-
Notifications
You must be signed in to change notification settings - Fork 80
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
MAX_IF 40 not sufficient for freebsd #62
Comments
I know about this issue, but your patch does not fix it. It just increase max limit to some random number. Real fix for this problem is to remove upper limit and change static memory allocation to dynamic one based on number of interfaces in system. |
Shouldn't that be fairly simple to acheive by using getifaddrs() / freeifaddrs() ? |
Well, I have not looked at it deeply how to implement it. If you this it is simple, feel free to open a pull request. |
First off, it's been some 20-25 years since I've done any real programming in c. Been looking through and analysing the source code yesterday and igmpproxy seems a basic enough project to get back into it. Like many people I currently have some time free to do this. So here's what I now think about solution to this issue.
Functions in ifvc.c are not used that much and I think I already have much of the above covered. |
Oh and maybe have MAX_IF be configurable. igmpproxy is often run on memory restrained systems |
So I think it does not make sense to complicate it. If your system has enough memory for having interface configured in system, there would be also additional 60 bytes for this interface usable for igmpproxy. |
Oh the sweet memories. It never works out the way you think when you finally figure out how stuff actually works. I currently have a working igmpproxy with dynamically allocated IfDesc table. In the end I did:
Attaching a patch for review. |
Could you please post patches in normal way, via git repository and pull request, and not in zip files which github cannot process? |
Please ignore last patch, attached incorrect version. |
Well, could you please really post patches in preferred way via git pull request? This is really hard for me review patches in this way. And also now if you have posted 3 files and so... Patches in pull request can be easily updated to "correct version". |
Looking into creating a pull request. In my good ol' days of programming there was only svn. :) |
This has been reported before I think, but because freebsd creates multiple logical interfaces for one actual, the default value of 40 for MAX_IF is often not sufficient. In my case even 200 was not enough, since my system has 16 phys ints, several laggs, 10 vlans per lagg and bridges across these.
I created the attached patch to fix this. I can create a pull request if you are willing to accept the patch.
The text was updated successfully, but these errors were encountered: