summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/netflow/netflow.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netgraph/netflow/netflow.c')
-rw-r--r--sys/netgraph/netflow/netflow.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c
index 7dc34be..8a77203 100644
--- a/sys/netgraph/netflow/netflow.c
+++ b/sys/netgraph/netflow/netflow.c
@@ -321,9 +321,11 @@ make_flow_rec(struct mbuf **m, int *plen, struct flow_rec *r, uint8_t *tcp_flags
r->r_ip_p = ip->ip_p;
r->r_tos = ip->ip_tos;
- if ((*m)->m_pkthdr.rcvif)
- r->r_i_ifx = (*m)->m_pkthdr.rcvif->if_index;
- else
+ /* Configured in_ifx overrides mbuf's */
+ if (i_ifx == 0) {
+ if ((*m)->m_pkthdr.rcvif)
+ r->r_i_ifx = (*m)->m_pkthdr.rcvif->if_index;
+ } else
r->r_i_ifx = i_ifx;
/*
OpenPOWER on IntegriCloud