Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Sep 2021 21:12:44 GMT
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 36854c4e1e86 - stable/13 - [netflow] fix gateway reporting in ng_netflow
Message-ID:  <202109072112.187LCiYg023828@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by melifaro:

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

commit 36854c4e1e862e437584e2c0bc363eb475dd86ee
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2021-05-30 10:11:08 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
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;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109072112.187LCiYg023828>