git: 8e55a80e0cc5 - main - [netflow] fix gateway reporting in ng_netflow
Alexander V. Chernikov
melifaro at FreeBSD.org
Sun May 30 10:31:35 UTC 2021
The branch main has been updated by melifaro:
URL: https://cgit.FreeBSD.org/src/commit/?id=8e55a80e0cc53002979f04a2504d2167267db3c2
commit 8e55a80e0cc53002979f04a2504d2167267db3c2
Author: Alexander V. Chernikov <melifaro at FreeBSD.org>
AuthorDate: 2021-05-30 10:11:08 +0000
Commit: Alexander V. Chernikov <melifaro at FreeBSD.org>
CommitDate: 2021-05-30 10:12:49 +0000
[netflow] fix gateway reporting in ng_netflow
Reported by: Guy Yur <guyyur at gmail.com>
MFC after: 3 days
---
sys/netgraph/netflow/netflow.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c
index e9fb83773a4b..f7f0648b296f 100644
--- a/sys/netgraph/netflow/netflow.c
+++ b/sys/netgraph/netflow/netflow.c
@@ -360,7 +360,7 @@ hash_insert(priv_p priv, struct flow_hash_entry *hsh, struct flow_rec *r,
rt_get_inet_prefix_plen(rt, &addr, &plen, &scopeid);
fle->f.fle_o_ifx = nh->nh_ifp->if_index;
- if (nh->gw_sa.sa_len == AF_INET)
+ if (nh->gw_sa.sa_family == AF_INET)
fle->f.next_hop = nh->gw4_sa.sin_addr;
fle->f.dst_mask = plen;
}
@@ -434,7 +434,7 @@ hash6_insert(priv_p priv, struct flow_hash_entry *hsh6, struct flow6_rec *r,
rt_get_inet6_prefix_plen(rt, &addr, &plen, &scopeid);
fle6->f.fle_o_ifx = nh->nh_ifp->if_index;
- if (nh->gw_sa.sa_len == AF_INET6)
+ if (nh->gw_sa.sa_family == AF_INET6)
fle6->f.n.next_hop6 = nh->gw6_sa.sin6_addr;
fle6->f.dst_mask = plen;
}
More information about the dev-commits-src-all
mailing list