svn commit: r332768 - stable/11/sys/netpfil/ipfw/nat64
Andrey V. Elsukov
ae at FreeBSD.org
Thu Apr 19 10:16:40 UTC 2018
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);
}
More information about the svn-src-stable-11
mailing list