Alexander Bluhm <[email protected]> wrote Sat., Aug. 06, 2011
> On Sat, Aug 06, 2011 at 12:47:27AM +0200, Alexander Bluhm wrote:
> > To trigger the bug, you need two adresses in the same network on
> > the carp and on the parent interface. One of them has the route,
> > the other cannot do ndp.
>
> The bridge has the same problem there, bridge and carp can be fixed
> in the same way.
Thank you. This patch works like a charm! :-)
> In my experience ipv6 bridge has always been broken and has more
> issues. Do we want this larger diff in release mode?
Sounds reasonable to me.
> bluhm
-Florian
> Index: netinet6/in6.c
> ===================================================================
> RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/in6.c,v
> retrieving revision 1.91
> diff -u -p -r1.91 in6.c
> --- netinet6/in6.c 26 Jul 2011 21:19:51 -0000 1.91
> +++ netinet6/in6.c 6 Aug 2011 05:04:18 -0000
> @@ -61,6 +61,9 @@
> * @(#)in.c 8.2 (Berkeley) 11/15/93
> */
>
> +#include "bridge.h"
> +#include "carp.h"
> +
> #include <sys/param.h>
> #include <sys/ioctl.h>
> #include <sys/errno.h>
> @@ -1945,7 +1948,16 @@ in6_ifpprefix(const struct ifnet *ifp, c
> if (rt == NULL)
> return (0);
> if ((rt->rt_flags & (RTF_CLONING | RTF_CLONED)) == 0 ||
> - rt->rt_ifp != ifp) {
> + (rt->rt_ifp != ifp &&
> +#if NBRIDGE > 0
> + (rt->rt_ifp->if_bridge == NULL || ifp->if_bridge == NULL ||
> + rt->rt_ifp->if_bridge != ifp->if_bridge) &&
> +#endif
> +#if NCARP > 0
> + (ifp->if_type != IFT_CARP || rt->rt_ifp != ifp->if_carpdev)
> &&
> + (rt->rt_ifp->if_type != IFT_CARP || rt->rt_ifp->if_carpdev !=
> ifp)&&
> +#endif
> + 1)) {
> RTFREE(rt);
> return (0);
> }