git: a0e9703f57cb - stable/12 - inet6(4): add a missing IPPROTO_ETHERIP entry

From: Koichiro Iwao <meta_at_FreeBSD.org>
Date: Wed, 19 Oct 2022 03:30:36 UTC
The branch stable/12 has been updated by meta (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=a0e9703f57cb2ba2bcf8a765f42f8fe702a3cca8

commit a0e9703f57cb2ba2bcf8a765f42f8fe702a3cca8
Author:     Hiroki Sato <hrs@FreeBSD.org>
AuthorDate: 2021-08-27 08:14:35 +0000
Commit:     Koichiro Iwao <meta@FreeBSD.org>
CommitDate: 2022-10-19 03:29:39 +0000

    inet6(4): add a missing IPPROTO_ETHERIP entry
    
    bridge(4) + gif(4) did not work when the outer protocol was IPv6.
    
    Submitted by:   Masahiro Kozuka
    PR:             256820
    
    Approved by:    hps (to cherry-pick)
    
    (cherry picked from commit 9823a0c0acf4fc277a71336ea737e1de7c65742f)
---
 sys/netinet6/in6_proto.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c
index b5270394d9f3..43d99e484fb8 100644
--- a/sys/netinet6/in6_proto.c
+++ b/sys/netinet6/in6_proto.c
@@ -295,6 +295,15 @@ struct protosw inet6sw[] = {
 	.pr_ctloutput =		rip6_ctloutput,
 	.pr_usrreqs =		&rip6_usrreqs
 },
+{
+	.pr_type =		SOCK_RAW,
+	.pr_domain =		&inet6domain,
+	.pr_protocol =		IPPROTO_ETHERIP,
+	.pr_flags =		PR_ATOMIC|PR_ADDR|PR_LASTHDR,
+	.pr_input =		encap6_input,
+	.pr_ctloutput =		rip6_ctloutput,
+	.pr_usrreqs =		&rip6_usrreqs
+},
 {
 	.pr_type =		SOCK_RAW,
 	.pr_domain =		&inet6domain,