-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
pimd didn't send announcement on FreeBSD #23
Comments
See config.mk |
Like @Sintezzz said, have you made sure to build for FreeBSD in config.mk? The default is to build for Linux, |
I've modified my config.mk by: I've got no more the "sendto.. Invalid argument" warning, but PIM neighbor discovery still didn't works. There are still this warning: tcpdump show this trace: And neighbor table still empty: Router1: Router2: |
I confirm the problem. On freebsd 9.2 does not appear PIM neighbors. |
Hi again, sorry for the late answer. Could you please try with the following line not commented out in config.mk. You likely need at least the define of RAW_INPUT_IS_RAW:
Without it |
I've tried with the line not commented… but no result and the "invalid argument" warning is back: warning - Sendto to 224.0.0.1 on 10.0.23.3:(error 22): Invalid argument |
OK, sorry to hear, but thanks for testing it! I'm in the process right now to install a FreeBSD 9.2 machine in Qemu. Where I'll try to sort this out. |
A hole slew of fixes in GIT as of 27b8a48, and it seems to work! :) If anyone can verify, please comment out Linux section and uncomment FreeBSD 9.x section (all relevant lines) in config.mk:
As you can see, my previous answer in this topic was unfortunately bogus. |
Any outstanding issues on this? I'm preparing a new release and any input would be greatly appreciated! :) |
I've tried with the proposed config.mk: as usually it compile and start… but I still didn't see no packet output. |
Did you pull in the latest fixes from the master branch? Also, do you have MROUTING enabled in your kernel? I had to rebuild my FreeBSD kernel for this. (NetBSD also needed to have its kernel rebuilt with MROUTING support, only OpenBSD worked out of the box!) I have a setup of virtual machines, four Ubuntu 12.04, one NetBSD 6.1.2, one FreeBSD 9.2 and one OpenBSD 5.4, all connected over three different bridges that I can snoop using Wireshark from my host. All routers run Quagga, with a mix of OSPF and RIP, mainly OSPF, to setup the unicast routing table that PIM-SM needs. Admittedly, there are some problems getting my virtual networking up and running, for me it was due to bugs in the IGMP snooping handling in the Linux bridge code on my host system. I've documented bits of it on my home page http://troglobit.com/multicast-howto.html |
I've tried the release afe15a9 on FreeBSD 10.0-RC5 and here is my problem:
|
Aha, thanks for the update! Oddly enough it seems to work on my 9.2 setup. :-( Do you see any "Cannot join group ..." in your logs?
Could it be something as simple as the interface flags not being set with MULTICAST? I know some bad drivers on Linux have problems with that ... other than that, I cannot find anything else than grasping for straws ... like this one https://forums.freebsd.org/viewtopic.php?&t=42583 ... |
My FreeBSD-fu is weak, but it seems the Linux /proc/net/igmp stats can be seen with the ifmcstat tool (which looks awesome btw!). On my system I get the following:
So it successfully changes to mode exclude for 224.0.0.13 for me. The kernel is GENERIC + "options MROUTING" ... |
Ok, I've tried to document the lab I'm working on here: => pimd correctly subscribe to 224.0.0.13, I did a mistake. By the way, I've write a FreeBSD port of pimd, you can download it from here: Once I will reach it to use it I will push the port in the official FreeBSD port tree. Regards, |
Great to hear, looking forward to having pimd stable in ports! :) Now, that warning you still see ... that's likely the root cause of this whole mess. (I'm changing the whole config.mk mess to fix this, will try to make it all auto-detect the OS instead ...) |
Yes I've commented all lines in the Linux section (then all the RAW), the patch file included in the port have this form: root@bsdrp:/usr/ports/net/pimd # cat files/patch-config.mk GNU/Linux systems do not seem to ship pim.h and pim_var.h,use local include/netinetFor uClibc based Linux systems, add -DHAVE_STRLCPY to DEFS-INCLUDES = -Iinclude FreeBSD -D__FreeBSD__ is defined by the OSVerified on FreeBSD-9.2, ...@@ -71,10 +71,10 @@ For older versions, add the following to INCLUDES below:-Iinclude/freebsd if ip_mroute.h or in.h is missing, and-Iinclude if pim.h is missing-#INCLUDES = NetBSD -DNetBSD is defined by the OSVerified on NetBSD 6.1.2, ... |
That's so utterly bizarre ... I really don't get those warnings, can't really figure out what they might be caused by either. Well, I've pushed the new configure script, so you won't have to edit/patch
... and then try again, I would be most grateful. Even though I've run out of ideas on how to fix your problem :-/ |
Your new configure script works fine ! |
That's both great and slightly troubling news at the same time. Hope you get some attention on the mailing list! I'm not subscribed, but don't hesitate sending devs here, or to my gmail address directly. Thanks! |
API was changed in 10.0, full explantation here: I've try a patch without success (no more warning message but still no PIM neighbor seen): http://pastebin.com/mX4xaWf5 I've only patched igmp.c, peraps we should patch pim.c too ? |
Uh, that's a fine mess they've created for themselves there. Seems FreeBSD 11 will be a lot more like Linux's reallay RAW sockets. I'm afraid that you might need to patch every place where I'd like to help out, which I will as soon as I get the time and have installed the fresh new FreeBSD 10, but right now I'm unfortunately busy with both work and another pimd issue (fragmentation of >MTU sized multicast frames). The pimd 2.2.0 release is postponed until both that issue and this FreeBSD issue is fixed. |
Don't spend your time on FreeBSD 10.0: Multicast PIM is broken on this release. Notice that releases X.0 are known for having lot's of regression. |
Ah, thanks for the heads up! That is very unfortunate for FreeBSD, but I'll try to document it somewhere at least. |
Just for the record: We've converted the FreeBSD RAW socket to be really RAW (like on Linux): http://svnweb.freebsd.org/base?view=revision&revision=270929 |
Great stuff, thanks @ocochard for the notification! I hope to get some time working on pimd and FreeBSD soon. |
@ocochard I patched up my FreeBSD 10 kernel, and now I've got pimd working! Will push my changes soon :) Also, after reading the kernel sources I understand more what it is that FreeBSD 10 does differently, so I'd like to try and support it too. Do you know what the preferred way of handling these sort of API differences on *BSD are? Should I use "#if __FreeBSD_version < 1100030" for all FreeBSD 10 and older, or do I need to do some more magic, e.g. for FreeBSD 9 and older? ... or maybe this is all documented somewhere and I should RTFM? ;) |
yes, the usage of "#if __FreeBSD_version < 1100030" is the correct way. |
See issue #23 and https://wiki.freebsd.org/SOCK_RAW for details. Thanks to Olivier Cochard-Labbé for all the sparring help on this and his work on FreeBSD! Signed-off-by: Joachim Nilsson <[email protected]>
There, it should be fixed now. Thank you so much for the help, @ocochard :-) pimd should now work on both older FreeBSD and the new raw socket code in the upcoming FreeBSD 11. Wasn't too hard after all. If only I could wrap my head around the fragmentation of register messages, then we could get a release out ... |
This is a port of the troglobit/pimd#23 patch that was brought to my attention by Olivier Cochard-Labbé. See the FreeBSD help at https://wiki.freebsd.org/SOCK_RAW for details. Signed-off-by: Joachim Nilsson <[email protected]>
This is a speculative, but very probable, fix for the FreeBSD regression reported in issue #57. In 28bbf4e two new checks for BSD `SOCK_RAW` was added, which seems didn't apply at all. Turns out PIM register messages, both send & receive, are in fact passed as truly RAW. At least on FreeBSD. This fix only reverts checks added to IGMP_PROTO sockets. Signed-off-by: Joachim Nilsson <[email protected]>
I've just tried to run pimd between 2 FreeBSD box (10.0-BETA2), and I've got lot's of error messages:
17:10:03.784 warning - sendto from 10.0.23.3 to 224.0.0.13:(error 22): Invalid argument
17:10:03.785 warning - Sendto to 224.0.0.1 on 10.0.34.3:(error 22): Invalid argument
17:10:03.786 warning - sendto from 10.0.34.3 to 224.0.0.13:(error 22): Invalid argument
17:10:48.527 warning - Received packet from 10.0.34.3 shorter (48 bytes) than hdr+data length (24+12264)
17:10:48.527 warning - Received packet from 10.0.23.3 shorter (48 bytes) than hdr+data length (24+12264)
17:10:48.727 warning - Received packet from 10.0.34.3 shorter (48 bytes) than hdr+data length (24+12264)
17:10:48.727 warning - Received packet from 10.0.23.3 shorter (48 bytes) than hdr+data length (24+12264)
17:11:48.877 warning - sendto from 10.0.23.3 to 224.0.0.13:(error 22): Invalid argument
17:11:48.877 warning - sendto from 10.0.34.3 to 224.0.0.13:(error 22): Invalid argument
And the second box don't received any PIM announcement from this first box.
Regards,
Olivier
The text was updated successfully, but these errors were encountered: