Date: Mon, 3 Jul 2017 10:10:04 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r320594 - in releng/11.1/sys/netpfil/ipfw: nat64 nptv6 pmod Message-ID: <201707031010.v63AA48p028139@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ae Date: Mon Jul 3 10:10:04 2017 New Revision: 320594 URL: https://svnweb.freebsd.org/changeset/base/320594 Log: Merge from stable/11 r320593: Fix IPv6 extension header parsing. The length field doesn't include the first 8 octets. Obtained from: Yandex LLC Approved by: re (marius) Modified: releng/11.1/sys/netpfil/ipfw/nat64/nat64_translate.c releng/11.1/sys/netpfil/ipfw/nptv6/nptv6.c releng/11.1/sys/netpfil/ipfw/pmod/tcpmod.c Directory Properties: releng/11.1/ (props changed) Modified: releng/11.1/sys/netpfil/ipfw/nat64/nat64_translate.c ============================================================================== --- releng/11.1/sys/netpfil/ipfw/nat64/nat64_translate.c Mon Jul 3 08:53:22 2017 (r320593) +++ releng/11.1/sys/netpfil/ipfw/nat64/nat64_translate.c Mon Jul 3 10:10:04 2017 (r320594) @@ -1054,7 +1054,7 @@ nat64_getlasthdr(struct mbuf *m, int *offset) if (proto == IPPROTO_HOPOPTS && ip6->ip6_plen == 0) return (-1); proto = hbh->ip6h_nxt; - hlen += hbh->ip6h_len << 3; + hlen += (hbh->ip6h_len + 1) << 3; } if (offset != NULL) *offset = hlen; Modified: releng/11.1/sys/netpfil/ipfw/nptv6/nptv6.c ============================================================================== --- releng/11.1/sys/netpfil/ipfw/nptv6/nptv6.c Mon Jul 3 08:53:22 2017 (r320593) +++ releng/11.1/sys/netpfil/ipfw/nptv6/nptv6.c Mon Jul 3 10:10:04 2017 (r320594) @@ -125,7 +125,7 @@ nptv6_getlasthdr(struct nptv6_cfg *cfg, struct mbuf *m if (m->m_len < hlen) return (-1); proto = hbh->ip6h_nxt; - hlen += hbh->ip6h_len << 3; + hlen += (hbh->ip6h_len + 1) << 3; } if (offset != NULL) *offset = hlen; Modified: releng/11.1/sys/netpfil/ipfw/pmod/tcpmod.c ============================================================================== --- releng/11.1/sys/netpfil/ipfw/pmod/tcpmod.c Mon Jul 3 08:53:22 2017 (r320593) +++ releng/11.1/sys/netpfil/ipfw/pmod/tcpmod.c Mon Jul 3 10:10:04 2017 (r320594) @@ -137,7 +137,7 @@ tcpmod_ipv6_setmss(struct mbuf **mp, uint16_t mss) proto == IPPROTO_DSTOPTS) { hbh = mtodo(*mp, hlen); proto = hbh->ip6h_nxt; - hlen += hbh->ip6h_len << 3; + hlen += (hbh->ip6h_len + 1) << 3; } tcp = mtodo(*mp, hlen); plen = (*mp)->m_pkthdr.len - hlen;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707031010.v63AA48p028139>