troglobit / smcroute

Static multicast routing for UNIX
https://troglobit.com/projects/smcroute/
GNU General Public License v2.0
244 stars 64 forks source link

Crashes when adding v6 route on a kernel without v6 multicast support #207

Closed kuba-moo closed 6 months ago

kuba-moo commented 6 months ago

Hi!

This line leads to a crash:

https://github.com/troglobit/smcroute/blob/cd259302b008205071b8ad81a2184a681e207cba/src/conf.c#L238

when adding a v6 route and kernel has no v6 mcast support. vif is equal to NO_VIF.

troglobit commented 6 months ago

Nice catch, NO_VIF == ALL_VIFS == -1, so that makes sense. We should add a check to the return of iface_get_vif(), I'll get right on it.

troglobit commented 6 months ago

Thank you for taking the time to report this! The issue has been fixed and released as SMCRoute v2.5.7