Hi,

in OpenBSD 5.6 NOINET6 gets disabled on a carp interface after configuring
an ipv6 address. Additionally you have to disable NOINET6 at the physical
interface or ip6_output() will fail because carp_send_ad() could not determine
an ipv6 source address via ifaof_ifpforaddr().

The attached patch enables IPv6 also at the carp parent interface if enabling
it at a carp interface.

Are there other interfaces which have the same problem?

Regards

Florian

Index: net/if.c
===================================================================
RCS file: /cvs/src/sys/net/if.c,v
retrieving revision 1.304
diff -u -p -r1.304 if.c
--- net/if.c    23 Nov 2014 07:39:02 -0000      1.304
+++ net/if.c    28 Nov 2014 19:39:58 -0000
@@ -1323,6 +1323,18 @@ ifioctl(struct socket *so, u_long cmd, c
                if (ifp->if_xflags & IFXF_NOINET6 &&
                    !(ifr->ifr_flags & IFXF_NOINET6)) {
                        ifp->if_xflags &= ~IFXF_NOINET6;
+#if NCARP > 0
+                       /* also enable ipv6 on carp parent interface */
+                       if (ifp->if_type == IFT_CARP && ifp->if_carpdev &&
+                           ifp->if_carpdev->if_xflags & IFXF_NOINET6) {
+                               ifp->if_carpdev->if_xflags &= ~IFXF_NOINET6;
+                               if (ifp->if_carpdev->if_flags & IFF_UP) {
+                                       s = splnet();
+                                       in6_if_up(ifp->if_carpdev);
+                                       splx(s);
+                               }
+                       }
+#endif
                        if (ifp->if_flags & IFF_UP) {
                                /* configure link-local address */
                                s = splnet();

Reply via email to