Date: Thu, 19 Apr 2018 10:16:39 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332768 - stable/11/sys/netpfil/ipfw/nat64 Message-ID: <201804191016.w3JAGdWF003332@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ae Date: Thu Apr 19 10:16:39 2018 New Revision: 332768 URL: https://svnweb.freebsd.org/changeset/base/332768 Log: MFC r332459: Fix integer types mismatch for flags field in nat64stl_cfg structure. Also preserve internal flags on NAT64STL reconfiguration. Modified: stable/11/sys/netpfil/ipfw/nat64/nat64stl.h stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/nat64/nat64stl.h ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64stl.h Thu Apr 19 10:15:11 2018 (r332767) +++ stable/11/sys/netpfil/ipfw/nat64/nat64stl.h Thu Apr 19 10:16:39 2018 (r332768) @@ -38,7 +38,7 @@ struct nat64stl_cfg { struct in6_addr prefix6;/* IPv6 prefix */ uint8_t plen6; /* prefix length */ - uint8_t flags; /* flags for internal use */ + uint32_t flags; /* flags for internal use */ #define NAT64STL_KIDX 0x0100 #define NAT64STL_46T 0x0200 #define NAT64STL_64T 0x0400 Modified: stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c Thu Apr 19 10:15:11 2018 (r332767) +++ stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c Thu Apr 19 10:16:39 2018 (r332768) @@ -289,8 +289,8 @@ nat64stl_config(struct ip_fw_chain *ch, ip_fw3_opheade * For now allow to change only following values: * flags. */ - - cfg->flags = uc->flags & NAT64STL_FLAGSMASK; + cfg->flags &= ~NAT64STL_FLAGSMASK; + cfg->flags |= uc->flags & NAT64STL_FLAGSMASK; IPFW_UH_WUNLOCK(ch); return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804191016.w3JAGdWF003332>