From 5d73850d14343da3e6a856e81ffc74b32d162e2c Mon Sep 17 00:00:00 2001 From: bluhm Date: Fri, 23 Jun 2017 11:18:12 +0000 Subject: [PATCH] Resetting the mbuf header in if_input_local() was stripping off the M_LOOP flag. This broke IPv6 multicast. Always set M_LOOP when going through if_input_local() and adjust the flag's comment. report rzalamena@; OK mpi@ --- sys/net/if.c | 3 ++- sys/sys/mbuf.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index c4fca1f88f3..6354484e477 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.503 2017/05/31 05:59:09 mpi Exp $ */ +/* $OpenBSD: if.c,v 1.504 2017/06/23 11:18:12 bluhm Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -750,6 +750,7 @@ if_input_local(struct ifnet *ifp, struct mbuf *m, sa_family_t af) } #endif m_resethdr(m); + m->m_flags |= M_LOOP; m->m_pkthdr.ph_ifidx = ifp->if_index; m->m_pkthdr.ph_rtableid = ifp->if_rdomain; diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 7f184049c81..422f49f1b65 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mbuf.h,v 1.230 2017/06/19 17:58:49 bluhm Exp $ */ +/* $OpenBSD: mbuf.h,v 1.231 2017/06/23 11:18:12 bluhm Exp $ */ /* $NetBSD: mbuf.h,v 1.19 1996/02/09 18:25:14 christos Exp $ */ /* @@ -186,7 +186,7 @@ struct mbuf { /* mbuf pkthdr flags, also in m_flags */ #define M_VLANTAG 0x0020 /* ether_vtag is valid */ -#define M_LOOP 0x0040 /* for Mbuf statistics */ +#define M_LOOP 0x0040 /* packet has been sent from local machine */ #define M_ACAST 0x0080 /* received as IPv6 anycast */ #define M_BCAST 0x0100 /* sent/received as link-level broadcast */ #define M_MCAST 0x0200 /* sent/received as link-level multicast */ -- 2.20.1