summaryrefslogtreecommitdiffstats
path: root/sys/netpfil
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2016-04-14 21:52:31 +0000
committerae <ae@FreeBSD.org>2016-04-14 21:52:31 +0000
commitc1f7aad42e892ceef31024a3ad2f07b56cbb28b6 (patch)
tree03c4384e5574a3e3f8c5a86acdab7c649bf1c908 /sys/netpfil
parent91b03b024c254d4a91a4ab05ed9ad1c086328a1f (diff)
downloadFreeBSD-src-c1f7aad42e892ceef31024a3ad2f07b56cbb28b6.zip
FreeBSD-src-c1f7aad42e892ceef31024a3ad2f07b56cbb28b6.tar.gz
Change the type of 'etlv' field in struct named_object to uint16_t.
It should match with the type field in struct ipfw_obj_tlv. Obtained from: Yandex LLC Sponsored by: Yandex LLC
Diffstat (limited to 'sys/netpfil')
-rw-r--r--sys/netpfil/ipfw/ip_fw_private.h6
-rw-r--r--sys/netpfil/ipfw/ip_fw_sockopt.c3
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_private.h b/sys/netpfil/ipfw/ip_fw_private.h
index 659af35..97c1a78 100644
--- a/sys/netpfil/ipfw/ip_fw_private.h
+++ b/sys/netpfil/ipfw/ip_fw_private.h
@@ -313,9 +313,9 @@ struct named_object {
TAILQ_ENTRY(named_object) nn_next; /* namehash */
TAILQ_ENTRY(named_object) nv_next; /* valuehash */
char *name; /* object name */
- uint8_t subtype; /* object subtype within class */
- uint8_t etlv; /* Export TLV id */
- uint16_t spare[2];
+ uint16_t etlv; /* Export TLV id */
+ uint8_t subtype;/* object subtype within class */
+ uint8_t spare[3];
uint16_t kidx; /* object kernel index */
uint32_t set; /* set object belongs to */
uint32_t refcnt; /* number of references */
diff --git a/sys/netpfil/ipfw/ip_fw_sockopt.c b/sys/netpfil/ipfw/ip_fw_sockopt.c
index 1264661..8144451 100644
--- a/sys/netpfil/ipfw/ip_fw_sockopt.c
+++ b/sys/netpfil/ipfw/ip_fw_sockopt.c
@@ -4063,7 +4063,8 @@ ipfw_objhash_lookup_name_type(struct namedobj_instance *ni, uint32_t set,
hash = ni->hash_f(ni, name, set) % ni->nn_size;
TAILQ_FOREACH(no, &ni->names[hash], nn_next) {
- if (ni->cmp_f(no, name, set) == 0 && no->etlv == type)
+ if (ni->cmp_f(no, name, set) == 0 &&
+ no->etlv == (uint16_t)type)
return (no);
}
OpenPOWER on IntegriCloud