Changeset View
Changeset View
Standalone View
Standalone View
sys/netgraph/netflow/netflow.c
Show First 20 Lines • Show All 358 Lines • ▼ Show 20 Lines | if (rt != NULL) { | ||||
uint32_t scopeid; | uint32_t scopeid; | ||||
struct nhop_object *nh = nhop_select_func(rnd.rnd_nhop, 0); | struct nhop_object *nh = nhop_select_func(rnd.rnd_nhop, 0); | ||||
int plen; | int plen; | ||||
rt_get_inet_prefix_plen(rt, &addr, &plen, &scopeid); | rt_get_inet_prefix_plen(rt, &addr, &plen, &scopeid); | ||||
fle->f.fle_o_ifx = nh->nh_ifp->if_index; | fle->f.fle_o_ifx = nh->nh_ifp->if_index; | ||||
if (nh->gw_sa.sa_family == AF_INET) | if (nh->gw_sa.sa_family == AF_INET) | ||||
fle->f.next_hop = nh->gw4_sa.sin_addr; | fle->f.next_hop = nh->gw4_sa.sin_addr; | ||||
/* | |||||
melifaro: Probably worth explicitly stating we're leaving an empty gateway here for IPv6 nexthops. | |||||
* XXX we're leaving an empty gateway here for | |||||
* IPv6 nexthops. | |||||
*/ | |||||
fle->f.dst_mask = plen; | fle->f.dst_mask = plen; | ||||
} | } | ||||
} | } | ||||
/* Do route lookup on source address, to fill in src_mask. */ | /* Do route lookup on source address, to fill in src_mask. */ | ||||
if ((flags & NG_NETFLOW_CONF_NOSRCLOOKUP) == 0) { | if ((flags & NG_NETFLOW_CONF_NOSRCLOOKUP) == 0) { | ||||
struct rtentry *rt; | struct rtentry *rt; | ||||
struct route_nhop_data rnd; | struct route_nhop_data rnd; | ||||
▲ Show 20 Lines • Show All 804 Lines • Show Last 20 Lines |
Probably worth explicitly stating we're leaving an empty gateway here for IPv6 nexthops.