aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/adj
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/adj')
-rw-r--r--src/vnet/adj/adj.c10
-rw-r--r--src/vnet/adj/adj_glean.c1
-rw-r--r--src/vnet/adj/adj_internal.h2
-rw-r--r--src/vnet/adj/adj_mcast.c2
-rw-r--r--src/vnet/adj/adj_midchain.c1
-rw-r--r--src/vnet/adj/adj_nbr.c2
6 files changed, 18 insertions, 0 deletions
diff --git a/src/vnet/adj/adj.c b/src/vnet/adj/adj.c
index f84969136c9..5f7fe74cd43 100644
--- a/src/vnet/adj/adj.c
+++ b/src/vnet/adj/adj.c
@@ -208,6 +208,16 @@ adj_last_lock_gone (ip_adjacency_t *adj)
pool_put(adj_pool, adj);
}
+u32
+adj_dpo_get_urpf (const dpo_id_t *dpo)
+{
+ ip_adjacency_t *adj;
+
+ adj = adj_get(dpo->dpoi_index);
+
+ return (adj->rewrite_header.sw_if_index);
+}
+
void
adj_lock (adj_index_t adj_index)
{
diff --git a/src/vnet/adj/adj_glean.c b/src/vnet/adj/adj_glean.c
index 8d86e2a9f00..82023f12dd2 100644
--- a/src/vnet/adj/adj_glean.c
+++ b/src/vnet/adj/adj_glean.c
@@ -251,6 +251,7 @@ const static dpo_vft_t adj_glean_dpo_vft = {
.dv_lock = adj_dpo_lock,
.dv_unlock = adj_dpo_unlock,
.dv_format = format_adj_glean,
+ .dv_get_urpf = adj_dpo_get_urpf,
};
/**
diff --git a/src/vnet/adj/adj_internal.h b/src/vnet/adj/adj_internal.h
index 2c123c542a1..ca41cb21d9e 100644
--- a/src/vnet/adj/adj_internal.h
+++ b/src/vnet/adj/adj_internal.h
@@ -109,4 +109,6 @@ extern void adj_glean_remove(fib_protocol_t proto,
extern void adj_mcast_remove(fib_protocol_t proto,
u32 sw_if_index);
+extern u32 adj_dpo_get_urpf(const dpo_id_t *dpo);
+
#endif
diff --git a/src/vnet/adj/adj_mcast.c b/src/vnet/adj/adj_mcast.c
index da06cd00b4e..00a12ad330b 100644
--- a/src/vnet/adj/adj_mcast.c
+++ b/src/vnet/adj/adj_mcast.c
@@ -387,11 +387,13 @@ const static dpo_vft_t adj_mcast_dpo_vft = {
.dv_lock = adj_dpo_lock,
.dv_unlock = adj_dpo_unlock,
.dv_format = format_adj_mcast,
+ .dv_get_urpf = adj_dpo_get_urpf,
};
const static dpo_vft_t adj_mcast_midchain_dpo_vft = {
.dv_lock = adj_dpo_lock,
.dv_unlock = adj_dpo_unlock,
.dv_format = format_adj_mcast_midchain,
+ .dv_get_urpf = adj_dpo_get_urpf,
};
/**
diff --git a/src/vnet/adj/adj_midchain.c b/src/vnet/adj/adj_midchain.c
index e9a510b004c..370fa4652f8 100644
--- a/src/vnet/adj/adj_midchain.c
+++ b/src/vnet/adj/adj_midchain.c
@@ -615,6 +615,7 @@ const static dpo_vft_t adj_midchain_dpo_vft = {
.dv_lock = adj_dpo_lock,
.dv_unlock = adj_dpo_unlock,
.dv_format = format_adj_midchain,
+ .dv_get_urpf = adj_dpo_get_urpf,
};
/**
diff --git a/src/vnet/adj/adj_nbr.c b/src/vnet/adj/adj_nbr.c
index 3d450d1fba3..fc7a7fcd93c 100644
--- a/src/vnet/adj/adj_nbr.c
+++ b/src/vnet/adj/adj_nbr.c
@@ -1047,11 +1047,13 @@ const static dpo_vft_t adj_nbr_dpo_vft = {
.dv_unlock = adj_dpo_unlock,
.dv_format = format_adj_nbr,
.dv_mem_show = adj_mem_show,
+ .dv_get_urpf = adj_dpo_get_urpf,
};
const static dpo_vft_t adj_nbr_incompl_dpo_vft = {
.dv_lock = adj_dpo_lock,
.dv_unlock = adj_dpo_unlock,
.dv_format = format_adj_nbr_incomplete,
+ .dv_get_urpf = adj_dpo_get_urpf,
};
/**