summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2018-02-12 18:14:39 +0100
committerNeale Ranns <nranns@cisco.com>2018-03-01 14:37:11 +0000
commit6ee4051139409eb53cd41b2b73dac838e8c4e8a0 (patch)
treec7c8e5ac17cfb31c84684a877e7da027c191e64e /src/vnet
parent62bab658e7ca782c8d35dacacfa5906ddbcaf437 (diff)
6RD: Rewritten 6RD RFC5969 support.
Change-Id: Ic30fbcb2630f39e45345d7215babf5d7ed4b33a0 Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/adj/adj_delegate.h1
-rw-r--r--src/vnet/adj/adj_glean.c9
-rw-r--r--src/vnet/adj/adj_glean.h1
-rw-r--r--src/vnet/adj/rewrite.c2
-rw-r--r--src/vnet/fib/fib_entry.h5
-rw-r--r--src/vnet/fib/fib_entry_src_special.c1
-rw-r--r--src/vnet/fib/fib_path.c1
-rw-r--r--src/vnet/ip/ip4_forward.c3
-rw-r--r--src/vnet/ip/ip6_forward.c3
9 files changed, 17 insertions, 9 deletions
diff --git a/src/vnet/adj/adj_delegate.h b/src/vnet/adj/adj_delegate.h
index c47380012f1..13bf911c5a6 100644
--- a/src/vnet/adj/adj_delegate.h
+++ b/src/vnet/adj/adj_delegate.h
@@ -99,7 +99,6 @@ extern int adj_delegate_add(ip_adjacency_t *adj,
adj_delegate_type_t fdt,
index_t adi);
-
/**
* @brief Get a delegate from an adjacency
*
diff --git a/src/vnet/adj/adj_glean.c b/src/vnet/adj/adj_glean.c
index 82d0a46eb1f..7de8e397737 100644
--- a/src/vnet/adj/adj_glean.c
+++ b/src/vnet/adj/adj_glean.c
@@ -48,6 +48,7 @@ adj_get_glean_node (fib_protocol_t proto)
*/
adj_index_t
adj_glean_add_or_lock (fib_protocol_t proto,
+ vnet_link_t linkt,
u32 sw_if_index,
const ip46_address_t *nh_addr)
{
@@ -61,15 +62,23 @@ adj_glean_add_or_lock (fib_protocol_t proto,
adj->lookup_next_index = IP_LOOKUP_NEXT_GLEAN;
adj->ia_nh_proto = proto;
+ adj->ia_link = linkt;
adj_gleans[proto][sw_if_index] = adj_get_index(adj);
if (NULL != nh_addr)
{
adj->sub_type.glean.receive_addr = *nh_addr;
}
+ else
+ {
+ adj->sub_type.glean.receive_addr = zero_addr;
+ }
adj->rewrite_header.sw_if_index = sw_if_index;
adj->rewrite_header.data_bytes = 0;
+ adj->rewrite_header.max_l3_packet_bytes =
+ vnet_sw_interface_get_mtu(vnet_get_main(), sw_if_index, VLIB_TX);
+
adj_lock(adj_get_index(adj));
vnet_update_adjacency_for_sw_interface(vnet_get_main(),
diff --git a/src/vnet/adj/adj_glean.h b/src/vnet/adj/adj_glean.h
index 47cddfbed2b..3ffbe36b51c 100644
--- a/src/vnet/adj/adj_glean.h
+++ b/src/vnet/adj/adj_glean.h
@@ -44,6 +44,7 @@
* as the source address in packets when the ARP/ND packet is sent
*/
extern adj_index_t adj_glean_add_or_lock(fib_protocol_t proto,
+ vnet_link_t linkt,
u32 sw_if_index,
const ip46_address_t *nh_addr);
diff --git a/src/vnet/adj/rewrite.c b/src/vnet/adj/rewrite.c
index c21495a9644..f4b26a9d0dd 100644
--- a/src/vnet/adj/rewrite.c
+++ b/src/vnet/adj/rewrite.c
@@ -82,6 +82,8 @@ format_vnet_rewrite (u8 * s, va_list * args)
s = format (s, "DELETED:%d", rw->sw_if_index);
}
+ s = format (s, " mtu:%d", rw->max_l3_packet_bytes);
+
/* Format rewrite string. */
if (rw->data_bytes > 0)
s = format (s, " %U",
diff --git a/src/vnet/fib/fib_entry.h b/src/vnet/fib/fib_entry.h
index 273a5e66b15..d905a839c48 100644
--- a/src/vnet/fib/fib_entry.h
+++ b/src/vnet/fib/fib_entry.h
@@ -81,10 +81,6 @@ typedef enum fib_source_t_ {
*/
FIB_SOURCE_MAP,
/**
- * SIXRD
- */
- FIB_SOURCE_SIXRD,
- /**
* DHCP
*/
FIB_SOURCE_DHCP,
@@ -151,7 +147,6 @@ STATIC_ASSERT (sizeof(fib_source_t) == 1,
[FIB_SOURCE_ADJ] = "adjacency", \
[FIB_SOURCE_MAP] = "MAP", \
[FIB_SOURCE_SR] = "SR", \
- [FIB_SOURCE_SIXRD] = "SixRD", \
[FIB_SOURCE_LISP] = "LISP", \
[FIB_SOURCE_CLASSIFY] = "classify", \
[FIB_SOURCE_DHCP] = "DHCP", \
diff --git a/src/vnet/fib/fib_entry_src_special.c b/src/vnet/fib/fib_entry_src_special.c
index a2493bb5be9..a2899161c8f 100644
--- a/src/vnet/fib/fib_entry_src_special.c
+++ b/src/vnet/fib/fib_entry_src_special.c
@@ -64,7 +64,6 @@ fib_entry_src_special_register (void)
{
fib_entry_src_register(FIB_SOURCE_SPECIAL, &special_src_vft);
fib_entry_src_register(FIB_SOURCE_MAP, &special_src_vft);
- fib_entry_src_register(FIB_SOURCE_SIXRD, &special_src_vft);
fib_entry_src_register(FIB_SOURCE_CLASSIFY, &special_src_vft);
fib_entry_src_register(FIB_SOURCE_AE, &special_src_vft);
fib_entry_src_register(FIB_SOURCE_PROXY, &special_src_vft);
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index ffb7ad228f1..b4f9971f52e 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -707,6 +707,7 @@ fib_path_attached_get_adj (fib_path_t *path,
else
{
return (adj_glean_add_or_lock(dpo_proto_to_fib(path->fp_nh_proto),
+ link,
path->attached.fp_interface,
NULL));
}
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index b9875d72b8e..6b7eb9c0f30 100644
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -1923,7 +1923,8 @@ ip4_probe_neighbor (vlib_main_t * vm, ip4_address_t * dst, u32 sw_if_index)
if (adj->lookup_next_index == IP_LOOKUP_NEXT_REWRITE)
{
adj_unlock (ai);
- ai = adj_glean_add_or_lock (FIB_PROTOCOL_IP4, sw_if_index, &nh);
+ ai = adj_glean_add_or_lock (FIB_PROTOCOL_IP4,
+ VNET_LINK_IP4, sw_if_index, &nh);
adj = adj_get (ai);
}
diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c
index 4fd7129e408..30b717f5545 100644
--- a/src/vnet/ip/ip6_forward.c
+++ b/src/vnet/ip/ip6_forward.c
@@ -1744,7 +1744,8 @@ ip6_probe_neighbor (vlib_main_t * vm, ip6_address_t * dst, u32 sw_if_index)
if (adj->lookup_next_index == IP_LOOKUP_NEXT_REWRITE)
{
adj_unlock (ai);
- ai = adj_glean_add_or_lock (FIB_PROTOCOL_IP6, sw_if_index, &nh);
+ ai = adj_glean_add_or_lock (FIB_PROTOCOL_IP6,
+ VNET_LINK_IP6, sw_if_index, &nh);
adj = adj_get (ai);
}