Date: Thu, 12 Apr 2018 21:29:41 +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: r332459 - head/sys/netpfil/ipfw/nat64 Message-ID: <201804122129.w3CLTfVM061961@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ae Date: Thu Apr 12 21:29:40 2018 New Revision: 332459 URL: https://svnweb.freebsd.org/changeset/base/332459 Log: Fix integer types mismatch for flags field in nat64stl_cfg structure. Also preserve internal flags on NAT64STL reconfiguration. Obtained from: Yandex LLC MFC after: 1 week Sponsored by: Yandex LLC Modified: head/sys/netpfil/ipfw/nat64/nat64stl.h head/sys/netpfil/ipfw/nat64/nat64stl_control.c Modified: head/sys/netpfil/ipfw/nat64/nat64stl.h ============================================================================== --- head/sys/netpfil/ipfw/nat64/nat64stl.h Thu Apr 12 21:21:18 2018 (r332458) +++ head/sys/netpfil/ipfw/nat64/nat64stl.h Thu Apr 12 21:29:40 2018 (r332459) @@ -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: head/sys/netpfil/ipfw/nat64/nat64stl_control.c ============================================================================== --- head/sys/netpfil/ipfw/nat64/nat64stl_control.c Thu Apr 12 21:21:18 2018 (r332458) +++ head/sys/netpfil/ipfw/nat64/nat64stl_control.c Thu Apr 12 21:29:40 2018 (r332459) @@ -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?201804122129.w3CLTfVM061961>