Lines Matching refs:gw
245 * Check if specified @gw matches gw data in the nexthop @nh.
250 match_nhop_gw(const struct nhop_object *nh, const struct sockaddr *gw)
253 if (nh->gw_sa.sa_family != gw->sa_family)
256 switch (gw->sa_family) {
259 ((const struct sockaddr_in *)gw)->sin_addr.s_addr);
263 gw6 = (const struct sockaddr_in6 *)gw;
278 sdl = (const struct sockaddr_dl *)gw;
282 return (memcmp(&nh->gw_sa, gw, nh->gw_sa.sa_len) == 0);
290 * Matches all nexthop with given @gw.
296 const struct sockaddr *gw = (const struct sockaddr *)gw_sa;
298 return (match_nhop_gw(nh, gw));
302 const struct sockaddr *gw;
315 if (match_nhop_gw(nh, gwd->gw) && gwd->count++ == 0)
331 const struct sockaddr *gw = info->rti_info[RTAX_GATEWAY];
339 if ((gw != NULL) && !match_nhop_gw(nh, gw))
522 * Attempts to delete @dst/plen prefix matching gateway @gw from the
528 * @gw: gateway to match
536 const struct sockaddr *gw, int op_flags, struct rib_cmd_info *rc)
538 struct gw_filter_data gwd = { .gw = gw };
740 FIB_RH_LOG(LOG_DEBUG, rnh, "error: RTF_GATEWAY set with empty gw");
952 struct gw_filter_data gwd = { .gw = info->rti_info[RTAX_GATEWAY] };
957 } else if (gwd.gw != NULL) {