Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Sep 2018 10:10:14 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338708 - head/sys/net
Message-ID:  <201809171010.w8HAAEjp074442@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Mon Sep 17 10:10:14 2018
New Revision: 338708
URL: https://svnweb.freebsd.org/changeset/base/338708

Log:
  Restore outbound packets capturing for if_gre(4). It was missed in r335048.
  Also clear M_MCAST and M_BCAST flags for encapsulated datagram, since it
  will have new IP header.
  
  Approved by:	re (kib)

Modified:
  head/sys/net/if_gre.c

Modified: head/sys/net/if_gre.c
==============================================================================
--- head/sys/net/if_gre.c	Mon Sep 17 02:51:08 2018	(r338707)
+++ head/sys/net/if_gre.c	Mon Sep 17 10:10:14 2018	(r338708)
@@ -569,6 +569,8 @@ gre_transmit(struct ifnet *ifp, struct mbuf *m)
 		goto drop;
 	}
 	af = m->m_pkthdr.csum_data;
+	BPF_MTAP2(ifp, &af, sizeof(af), m);
+	m->m_flags &= ~(M_BCAST|M_MCAST);
 	M_SETFIB(m, sc->gre_fibnum);
 	M_PREPEND(m, sc->gre_hlen, M_NOWAIT);
 	if (m == NULL) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809171010.w8HAAEjp074442>