diff options
author | Luiz Souza <luiz@netgate.com> | 2017-10-07 14:01:54 -0500 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2017-10-07 14:07:14 -0500 |
commit | 31356f365bc68094ebc62a6dbd1e67f0f503c8ee (patch) | |
tree | 0f2c1099ab8dedec2a59ce5d2937aee598796fca | |
parent | 277eb2fc4f8c2171ed1caae16e98405fd9e572cb (diff) | |
download | FreeBSD-src-31356f365bc68094ebc62a6dbd1e67f0f503c8ee.zip FreeBSD-src-31356f365bc68094ebc62a6dbd1e67f0f503c8ee.tar.gz |
Fix the build. Reduce the interface name size on ipfw tables.
(cherry picked from commit b7debabcb29e3913e24a5470983bcf0bb7bf2a28)
-rw-r--r-- | sys/netpfil/ipfw/ip_fw_table_algo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_table_algo.c b/sys/netpfil/ipfw/ip_fw_table_algo.c index dfa80c6..c2c41e6 100644 --- a/sys/netpfil/ipfw/ip_fw_table_algo.c +++ b/sys/netpfil/ipfw/ip_fw_table_algo.c @@ -2738,7 +2738,7 @@ ta_dump_ifidx_tentry(void *ta_state, struct table_info *ti, void *e, ife = (struct ifentry *)e; - tent->masklen = 8 * IF_NAMESIZE; + tent->masklen = min(2 << ((sizeof(uint8_t) * 8) - 1), 8 * IF_NAMESIZE); memcpy(&tent->k, ife->no.name, IF_NAMESIZE); tent->v.kidx = ife->value; |