The branch stable/13 has been updated by melifaro:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=36854c4e1e862e437584e2c0bc363eb475dd86ee

commit 36854c4e1e862e437584e2c0bc363eb475dd86ee
Author:     Alexander V. Chernikov <[email protected]>
AuthorDate: 2021-05-30 10:11:08 +0000
Commit:     Alexander V. Chernikov <[email protected]>
CommitDate: 2021-09-07 21:02:57 +0000

    [netflow] fix gateway reporting in ng_netflow
    
    Reported by:    Guy Yur <guyyur at gmail.com>
    
    (cherry picked from commit 8e55a80e0cc53002979f04a2504d2167267db3c2)
---
 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;
                }
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to