aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vnet/ethernet/arp.c6
-rw-r--r--src/vnet/ip/ip_api.c11
2 files changed, 14 insertions, 3 deletions
diff --git a/src/vnet/ethernet/arp.c b/src/vnet/ethernet/arp.c
index 13b718d4c62..e6e3a515b97 100644
--- a/src/vnet/ethernet/arp.c
+++ b/src/vnet/ethernet/arp.c
@@ -894,6 +894,7 @@ typedef enum
_ (gratuitous_arp, "ARP probe or announcement dropped") \
_ (interface_no_table, "Interface is not mapped to an IP table") \
_ (interface_not_ip_enabled, "Interface is not IP enabled") \
+ _ (unnumbered_mismatch, "RX interface is unnumbered to different subnet") \
typedef enum
{
@@ -1258,7 +1259,10 @@ arp_input (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
if (is_unnum0)
{
if (!arp_unnumbered (p0, sw_if_index0, conn_sw_if_index0))
- goto drop2;
+ {
+ error0 = ETHERNET_ARP_ERROR_unnumbered_mismatch;
+ goto drop2;
+ }
}
}
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index 42ce883c234..b9fa001553f 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -808,7 +808,13 @@ add_del_route_t_handler (u8 is_multipath,
path.frp_eos = MPLS_NON_EOS;
}
if (is_local)
- path_flags |= FIB_ROUTE_PATH_LOCAL;
+ {
+ path_flags |= FIB_ROUTE_PATH_LOCAL;
+ if (~0 != next_hop_sw_if_index)
+ {
+ entry_flags |= (FIB_ENTRY_FLAG_CONNECTED | FIB_ENTRY_FLAG_LOCAL);
+ }
+ }
if (is_dvr)
path_flags |= FIB_ROUTE_PATH_DVR;
if (is_resolve_host)
@@ -838,7 +844,8 @@ add_del_route_t_handler (u8 is_multipath,
stats_dslock_with_hint (1 /* release hint */ , 2 /* tag */ );
- if (is_drop || is_local || is_classify || is_unreach || is_prohibit)
+ if (is_drop || (is_local && (~0 == next_hop_sw_if_index)) ||
+ is_classify || is_unreach || is_prohibit)
{
/*
* special route types that link directly to the adj