svn commit: r334703 - head/sys/netinet6
Andrey V. Elsukov
ae at FreeBSD.org
Wed Jun 6 05:17:22 UTC 2018
Author: ae
Date: Wed Jun 6 05:17:21 2018
New Revision: 334703
URL: https://svnweb.freebsd.org/changeset/base/334703
Log:
Fix LINT-NOINET build.
Use known at build time size for min_length value. Also remove the
check from in6_gre_encapcheck(), now it is done in generic code.
Modified:
head/sys/netinet6/ip6_gre.c
Modified: head/sys/netinet6/ip6_gre.c
==============================================================================
--- head/sys/netinet6/ip6_gre.c Wed Jun 6 05:08:05 2018 (r334702)
+++ head/sys/netinet6/ip6_gre.c Wed Jun 6 05:17:21 2018 (r334703)
@@ -79,17 +79,6 @@ in6_gre_encapcheck(const struct mbuf *m, int off, int
return (0);
M_ASSERTPKTHDR(m);
- /*
- * We expect that payload contains at least IPv4
- * or IPv6 packet.
- */
- if (m->m_pkthdr.len < sizeof(struct greip6) +
-#ifdef INET
- sizeof(struct ip))
-#else
- sizeof(struct ip6_hdr))
-#endif
- return (0);
GRE_RLOCK(sc);
if (sc->gre_family == 0)
@@ -122,7 +111,12 @@ in6_gre_output(struct mbuf *m, int af, int hlen)
static const struct encap_config ipv6_encap_cfg = {
.proto = IPPROTO_GRE,
- .min_length = sizeof(struct greip6) + sizeof(struct ip),
+ .min_length = sizeof(struct greip6) +
+#ifdef INET
+ sizeof(struct ip),
+#else
+ sizeof(struct ip6_hdr),
+#endif
.exact_match = (sizeof(struct in6_addr) << 4) + 32,
.check = in6_gre_encapcheck,
.input = gre_input
More information about the svn-src-all
mailing list