MCPcopy Create free account
hub / github.com/F-Stack/f-stack / check_urpf

Function check_urpf

freebsd/netinet/in_fib.c:193–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193static int
194check_urpf(struct nhop_object *nh, uint32_t flags,
195 const struct ifnet *src_if)
196{
197#ifdef ROUTE_MPATH
198 if (NH_IS_NHGRP(nh)) {
199 struct weightened_nhop *wn;
200 uint32_t num_nhops;
201 wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops);
202 for (int i = 0; i < num_nhops; i++) {
203 if (check_urpf_nhop(wn[i].nh, flags, src_if) != 0)
204 return (1);
205 }
206 return (0);
207 } else
208#endif
209 return (check_urpf_nhop(nh, flags, src_if));
210}
211
212#ifndef FIB_ALGO
213static struct nhop_object *

Callers 1

fib4_check_urpfFunction · 0.70

Calls 2

check_urpf_nhopFunction · 0.70
nhgrp_get_nhopsFunction · 0.50

Tested by

no test coverage detected