Multicast routing questions

Emeric POUPON emeric.poupon at
Wed Jun 24 15:13:16 UTC 2015


Actually, I don't really understand why imo.imo_multicast_loop is set to 1 in send_packet, ip_mroute.c

It seems we don't need to loop the packet once it is mrouted?
If the packet is emitted locally, the imo_multicast_loop set by the socket option makes the packet loop back if necessary.


----- Mail original -----
De: "Emeric POUPON" <emeric.poupon at>
À: freebsd-net at
Envoyé: Mercredi 24 Juin 2015 10:22:45
Objet: Multicast routing questions


I'm testing multicast routing on FreeBSD 9.3 and I have a question:

In packet reception, it seems the packet is received locally as many times the packet is rerouted + 1:
ip_input -> ip_mforward -> ip_output (as many times there are dst interfaces in the route cache entry) -> ip_mloopback -> if_simloop (rcvif becomes the ifp of the output interface) -> ip_input -> ip_mforward -> ...
In ip_input, after each ip_mforward call, the packet is processed locally (using the goto "ours:")
Futhermore it seems this infinite loop is actually broken thanks to a test in ip_mforward that checks the ifp is the same as the registered one in the cache entry.

Maybe I missed something, but it does not seem to be working as expected.
What do you think?


freebsd-net at mailing list
To unsubscribe, send any mail to "freebsd-net-unsubscribe at"

More information about the freebsd-net mailing list