diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 8f6d8a2..0000000 --- a/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -Copyright © 2002 The Board of Trustees of the Leland Stanford Junior University - -Permission is hereby granted to STANFORD's rights, free of charge, to any -person obtaining a copy of this Software and associated documentation files -("MROUTED"), to deal in MROUTED without restriction, including without -limitation the rights to use, copy, modify, merge, publish, distribute, -sublicense, and/or sell copies of MROUTED, and to permit persons to whom -MROUTED is furnished to do so, subject to the following conditions: - -1) The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the MROUTED. - -2) Neither the STANFORD name nor the names of its contributors may be used - in any promotional advertising or other promotional materials to be - disseminated to the public or any portion thereof nor to use the name of - any STANFORD faculty member, employee, or student, or any trademark, - service mark, trade name, or symbol of STANFORD or Stanford Hospitals - and Clinics, nor any that is associated with any of them, without - STANFORD's prior written consent. Any use of STANFORD's name shall be - limited to statements of fact and shall not imply endorsement of any - products or services. - -3) MROUTED IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH MROUTED OR THE USE OR OTHER - DEALINGS IN THE MROUTED. diff --git a/README.md b/README.md index afafd94..887b8bc 100644 --- a/README.md +++ b/README.md @@ -75,72 +75,9 @@ win an election. > needs to be SIGHUP'ed to use any new interface or address, e.g. DHCP. -Motivation ----------- - -The Linux bridge recently gained support for per-VLAN IGMP/MLD snooping. -It stands fine on its own legs, with lots of new per-VLAN settings. But -since it lives in the bridge, it cannot know about any VLAN interfaces -that may (or may not) sit on top of the bridge. There are naming issues -(br0.1 vs vlan1), and the fact that an interface can have multiple IP -addresses assigned to it. Therefore, the current bridge implementation -in `br_multicast.c` can only act as a proxy querier, i.e., for IGMP this -means it can only send queries (per-VLAN) with source IP 0.0.0.0. - -To understand why this might be a problem there are two things to -consider: - - 1. Some networks don't have a (dynamic) multicast router¹. Usually the - multicast router is the IGMP/MLD querier for a LAN, but some LANs - consist only of (industrial) switches that try their best to limit - the spread of multicast² on low-capacity links - 2. Some end-devices discard queries with source IP 0.0.0.0. This is - of course wrong, but good luck telling a PLC vendor they should - change their embedded firmware of an aging product, or even the - customer site to upgrade their locked-down system with a brand new - firmware -- these people don't like change and sometimes because it - comes with drawn-out re-certification processes - -So, proxy queries are allowed per RFC, but that might not work with some -end-devices, and we can't disable proxy-query because some end-devices -don't do gratuitous join/leave. Hence, we need a service to provide us -with an IGMP/MLD querier that can (at least) use one of the IP address -on the interfaces we have on top of the bridge. - -Other limitations to be aware of in `br_multicast.c` (currently) is the -lack of IGMP/MLD version fallback. I.e., per RFC, the LAN should start -out as IGMPv3 and when an end-device shows up with an IGMPv2 join then -the whole LAN should fall back to to IGMPv2, with a timer to return to -IGMPv3 if that end-device stops transmitting (IGMP control frames). Of -course, optimizations can be done here, e.g., only falling back on the -given port, or not tracking (the timer) per individual end-devices. It -is worth remembering, that the IGMP standard was written for old hubbed -networks, in those days everyone could see a single IGMPv2 message and -everyone could potentially confuse that end-device with a newer version. - -_____ -¹ E.g., Quagga/Frr PIM, or little mrouted/pimd/pimd-dense/pim6sd -² remember, multicast acts like broadcast if it's not limited (by IGMP - or MLD), so disabling IGMP/MLD snooping is not an option in these - networks, they are what actually keep most of these sites afloat. - - -Origin & References -------------------- - -This is a fork of [querierd][], by Westermo Network Technologies, which -in turn was based on the [mrouted][] project, with DNA strands from the -[pimd][] project. It should be quite easy to also add MLD/MLDv2 querier -functionality from the [pim6sd][] project, because they all share a the -same ancestor (mrouted). - [GitHub]: https://github.com/kernelkit/mcd/actions/workflows/build.yml/ [GitHub Status]: https://github.com/kernelkit/mcd/actions/workflows/build.yml/badge.svg [License]: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/mrouted/LICENSE [License Badge]: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg [Coverity Scan]: https://scan.coverity.com/projects/24475 [Coverity Status]: https://scan.coverity.com/projects/24475/badge.svg -[querierd]: https://github.com/westermo/querierd/ -[mrouted]: https://github.com/troglobit/mrouted/ -[pimd]: https://github.com/troglobit/pimd/ -[pim6sd]: https://github.com/troglobit/pim6sd/ diff --git a/src/config.c b/src/config.c index 2c7d86c..ff57531 100644 --- a/src/config.c +++ b/src/config.c @@ -1,8 +1,3 @@ -/* - * Parts of this program has been derived from mrouted. It is covered - * by the license in the accompanying file named "LICENSE". - */ - #include #include "defs.h" diff --git a/src/defs.h b/src/defs.h index 0a8148c..25a0c30 100644 --- a/src/defs.h +++ b/src/defs.h @@ -1,7 +1,3 @@ -/* - * Parts of this program has been derived from mrouted. It is covered - * by the license in the accompanying file named "LICENSE". - */ #ifndef MCD_DEFS_H_ #define MCD_DEFS_H_ diff --git a/src/iface.c b/src/iface.c index 61de361..c201b42 100644 --- a/src/iface.c +++ b/src/iface.c @@ -1,8 +1,3 @@ -/* - * Parts of this program has been derived from mrouted. It is covered - * by the license in the accompanying file named "LICENSE". - */ - #include "defs.h" #include "inet.h" diff --git a/src/iface.h b/src/iface.h index b260ce2..8309bcb 100644 --- a/src/iface.h +++ b/src/iface.h @@ -1,7 +1,3 @@ -/* - * Parts of this program has been derived from mrouted. It is covered - * by the license in the accompanying file named "LICENSE". - */ #ifndef MCD_IFACE_H_ #define MCD_IFACE_H_ diff --git a/src/igmp.c b/src/igmp.c index dd8935d..6d187fa 100644 --- a/src/igmp.c +++ b/src/igmp.c @@ -1,8 +1,3 @@ -/* - * Parts of this program has been derived from mrouted. It is covered - * by the license in the accompanying file named "LICENSE". - */ - #include #include #include diff --git a/src/igmpv2.h b/src/igmpv2.h index 1ab169c..01a01cf 100644 --- a/src/igmpv2.h +++ b/src/igmpv2.h @@ -1,8 +1,3 @@ -/* - * Parts of this program has been derived from mrouted. It is covered - * by the license in the accompanying file named "LICENSE". - */ - /* * Constants for IGMP Version 2. Several of these, especially the * robustness variable, should be variables and not constants. diff --git a/src/igmpv3.h b/src/igmpv3.h index 17abc02..a1e59dd 100644 --- a/src/igmpv3.h +++ b/src/igmpv3.h @@ -1,35 +1,5 @@ -/* - * Copyright (c) 1998-2001 - * University of Southern California/Information Sciences Institute. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef PIMD_IGMPV3_H_ -#define PIMD_IGMPV3_H_ +#ifndef MCD_IGMPV3_H_ +#define MCD_IGMPV3_H_ /* * IGMPv3 report modes. @@ -88,7 +58,7 @@ struct igmpv3_report { #define IGMP_V3_REPORT_MAXRECS 65535 #endif -#endif /* PIMD_IGMPV3_H_ */ +#endif /* MCD_IGMPV3_H_ */ /** * Local Variables: diff --git a/src/inet.c b/src/inet.c index aa1563a..1b96880 100644 --- a/src/inet.c +++ b/src/inet.c @@ -1,8 +1,3 @@ -/* - * Parts of this program has been derived from mrouted. It is covered - * by the license in the accompanying file named "LICENSE". - */ - #include #include "defs.h" diff --git a/src/inet.h b/src/inet.h index 410f8b1..912b118 100644 --- a/src/inet.h +++ b/src/inet.h @@ -1,8 +1,3 @@ -/* - * Parts of this program has been derived from mrouted. It is covered - * by the license in the accompanying file named "LICENSE". - */ - #ifndef MCD_INET_H_ #define MCD_INET_H_ diff --git a/src/ipc.c b/src/ipc.c index 515d316..f3fac38 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -1,30 +1,17 @@ /* * Copyright (c) 2018-2020 Joachim Wiberg - * All rights reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* diff --git a/src/ipc.h b/src/ipc.h index dff81fb..bd4b430 100644 --- a/src/ipc.h +++ b/src/ipc.h @@ -1,7 +1,19 @@ /* - * Parts of this program has been derived from mrouted. It is covered - * by the license in the accompanying file named "LICENSE". + * Copyright (c) 2018-2020 Joachim Wiberg + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ + #ifndef MCD_IPC_H_ #define MCD_IPC_H_ diff --git a/src/log.c b/src/log.c index 79ddfd2..8b1af58 100644 --- a/src/log.c +++ b/src/log.c @@ -1,8 +1,3 @@ -/* - * Parts of this program has been derived from mrouted. It is covered - * by the license in the accompanying file named "LICENSE". - */ - #define SYSLOG_NAMES #include "defs.h" #include diff --git a/src/main.c b/src/main.c index 3b3cb15..f101b60 100644 --- a/src/main.c +++ b/src/main.c @@ -1,8 +1,3 @@ -/* - * Parts of this program has been derived from mrouted. It is covered - * by the license in the accompanying file named "LICENSE". - */ - #include "defs.h" #include #include diff --git a/src/mctl.c b/src/mctl.c index e3e57d5..1b901f4 100644 --- a/src/mctl.c +++ b/src/mctl.c @@ -1,30 +1,17 @@ /* * Copyright (c) 2018-2020 Joachim Wiberg - * All rights reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "config.h" diff --git a/src/pathnames.h b/src/pathnames.h index 81ce907..727aacd 100644 --- a/src/pathnames.h +++ b/src/pathnames.h @@ -1,14 +1,10 @@ -/* - * Parts of this program has been derived from mrouted. It is covered - * by the license in the accompanying file named "LICENSE". - */ #ifndef MCD_PATHNAMES_H_ #define MCD_PATHNAMES_H_ #include -#define _PATH_MCD_CONF SYSCONFDIR "/%s.conf" -#define _PATH_MCD_RUNDIR RUNSTATEDIR -#define _PATH_MCD_SOCK RUNSTATEDIR "/%s.sock" +#define _PATH_MCD_CONF SYSCONFDIR "/%s.conf" +#define _PATH_MCD_RUNDIR RUNSTATEDIR +#define _PATH_MCD_SOCK RUNSTATEDIR "/%s.sock" #endif /* MCD_PATHNAMES_H_ */