diff options
author | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2020-12-14 22:54:32 +0000 |
---|---|---|
committer | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2020-12-14 22:54:32 +0000 |
commit | 3ad80c65314e877abc10712824f77b3cb0d6212f (patch) | |
tree | 05b1eb11b61243b288a2a73a19ae2a335080fea1 /sys/netpfil | |
parent | 3fd989da911870732b6a7ef43b6be866a8d79cce (diff) | |
download | src-3ad80c65314e877abc10712824f77b3cb0d6212f.tar.gz src-3ad80c65314e877abc10712824f77b3cb0d6212f.zip |
Fix LINT-NOINET6 build after r368571.
Reported by: mjg
Notes
Notes:
svn path=/head/; revision=368651
Diffstat (limited to 'sys/netpfil')
-rw-r--r-- | sys/netpfil/ipfw/ip_fw_table_algo.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_table_algo.c b/sys/netpfil/ipfw/ip_fw_table_algo.c index e09a9eb2cba7..25a4ae1d6a0b 100644 --- a/sys/netpfil/ipfw/ip_fw_table_algo.c +++ b/sys/netpfil/ipfw/ip_fw_table_algo.c @@ -3935,16 +3935,24 @@ static int ta_find_kfib_tentry(void *ta_state, struct table_info *ti, ipfw_obj_tentry *tent) { - struct rtentry *rt; + struct rtentry *rt = NULL; struct route_nhop_data rnd; struct epoch_tracker et; int error; NET_EPOCH_ENTER(et); - if (tent->subtype == AF_INET) { + + switch (tent->subtype) { +#ifdef INET + case AF_INET: rt = fib4_lookup_rt(ti->data, tent->k.addr, 0, 0, &rnd); - } else { + break; +#endif +#ifdef INET6 + case AF_INET6: rt = fib6_lookup_rt(ti->data, &tent->k.addr6, 0, 0, &rnd); + break; +#endif } if (rt != NULL) error = ta_dump_kfib_tentry_int(tent->subtype, rt, tent); |