X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip6-nd%2Fip6_ra.c;h=d3597706293c2e63ecceb8a0801067a7a4effc4c;hb=2c77ae484;hp=547ecf310340ed86ce01fa20a88f3bc93ca710ad;hpb=f553a2cbbb8cca84ebf033335ebd2cd26dc19d69;p=vpp.git
diff --git a/src/vnet/ip6-nd/ip6_ra.c b/src/vnet/ip6-nd/ip6_ra.c
index 547ecf31034..d3597706293 100644
--- a/src/vnet/ip6-nd/ip6_ra.c
+++ b/src/vnet/ip6-nd/ip6_ra.c
@@ -270,6 +270,9 @@ typedef enum
ICMP6_ROUTER_SOLICITATION_N_NEXT,
} icmp6_router_solicitation_or_advertisement_next_t;
+/*
+ * Note: Both periodic RAs and solicited RS come through here.
+ */
static_always_inline uword
icmp6_router_solicitation (vlib_main_t * vm,
vlib_node_runtime_t * node, vlib_frame_t * frame)
@@ -413,7 +416,9 @@ icmp6_router_solicitation (vlib_main_t * vm,
error0 = ((!radv_info) ?
ICMP6_ERROR_ROUTER_SOLICITATION_RADV_NOT_CONFIG :
error0);
-
+ error0 = radv_info->send_radv == 0 ?
+ ICMP6_ERROR_ROUTER_SOLICITATION_RADV_NOT_CONFIG :
+ error0;
if (error0 == ICMP6_ERROR_NONE)
{
f64 now = vlib_time_now (vm);
@@ -1132,7 +1137,6 @@ create_buffer_for_rs (vlib_main_t * vm, ip6_ra_t * radv_info)
}
p0 = vlib_get_buffer (vm, bi0);
- VLIB_BUFFER_TRACE_TRAJECTORY_INIT (p0);
p0->flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
vnet_buffer (p0)->sw_if_index[VLIB_RX] = sw_if_index;
@@ -2171,7 +2175,6 @@ format_ip6_ra (u8 * s, va_list * args)
return (s);
}
-
/*?
* This command is used to configure the neighbor discovery
* parameters on a given interface. Use the 'show ip6 interface'
@@ -2179,9 +2182,16 @@ format_ip6_ra (u8 * s, va_list * args)
* on a given interface. This command has three formats:
*
*
- * Format 1 - Router Advertisement Options: (Only one can be entered in a single command)
+ * Format 1 - Router Advertisement Options: (Only one can be entered in
+ * a single command)
*
- * 'ip6 nd [no] [ra-managed-config-flag] | [ra-other-config-flag] | [ra-suppress] | [ra-suppress-link-layer] | [ra-send-unicast] | [ra-lifetime ] | [ra-initial ] | [ra-interval []] | [ra-cease]'
+ * @clistart
+ * ip6 nd [no] [ra-managed-config-flag] |
+ * [ra-other-config-flag] | [ra-suppress] | [ra-suppress-link-layer] |
+ * [ra-send-unicast] | [ra-lifetime ] |
+ * [ra-initial ] |
+ * [ra-interval []] | [ra-cease]
+ * @cliend
*
* Where:
*
@@ -2207,7 +2217,7 @@ format_ip6_ra (u8 * s, va_list * args)
* and the 'no' option returns it to this default state.
*
* [no] ra-send-unicast - Use the source address of the
- * router-solicitation message if availiable. The default is to use
+ * router-solicitation message if available. The default is to use
* multicast address of all nodes, and the 'no' option returns
* it to this default state.
*
@@ -2238,52 +2248,60 @@ format_ip6_ra (u8 * s, va_list * args)
*
* Format 2 - Prefix Options:
*
- * 'ip6 nd [no] prefix / [ | infinite] [no-advertise] [off-link] [no-autoconfig] [no-onlink]'
+ * @clistart
+ * ip6 nd [no] prefix /
+ * [ | infinite] [no-advertise] [off-link]
+ * [no-autoconfig] [no-onlink]
+ * @cliend
*
* Where:
*
* no - All additional flags are ignored and the prefix is deleted.
*
- * - '' is the
- * length of time in seconds during what the prefix is valid for the purpose of
- * on-link determination. Range is 7203 to 2592000 seconds and default is 2592000
- * seconds (30 days). '' is the prefered-lifetime and is the
- * length of time in seconds during what addresses generated from the prefix remain
- * preferred. Range is 0 to 604800 seconds and default is 604800 seconds (7 days).
+ * - '' is
+ * the length of time in seconds during what the prefix is valid for the
+ * purpose of on-link determination. Range is 7203 to 2592000 seconds and
+ * default is 2592000 seconds (30 days). '' is the
+ * preferred-lifetime and is the length of time in seconds during what
+ * addresses generated from the prefix remain preferred. Range is 0 to 604800
+ * seconds and default is 604800 seconds (7 days).
*
- * infinite - Both '' and '<'
- * are inifinte, no timeout.
+ * infinite - Both '' and
+ * '' are infinite, no timeout.
*
* no-advertise - Do not send full router address in prefix
* advertisement. Default is to advertise (i.e. - This flag is off by default).
*
- * off-link - Prefix is off-link, clear L-bit in packet. Default is on-link
- * (i.e. - This flag is off and L-bit in packet is set by default and this prefix can
- * be used for on-link determination). 'no-onlink' also controls the L-bit.
+ * off-link - Prefix is off-link, clear L-bit in packet. Default is
+ * on-link (i.e. - This flag is off and L-bit in packet is set by default
+ * and this prefix can be used for on-link determination). 'no-onlink'
+ * also controls the L-bit.
*
- * no-autoconfig - Do not use prefix for autoconfiguration, clear A-bit in packet.
- * Default is autoconfig (i.e. - This flag is off and A-bit in packet is set by default.
+ * no-autoconfig - Do not use prefix for autoconfiguration, clear
+ * A-bit in packet. Default is autoconfig (i.e. - This flag is off and A-bit
+ * in packet is set by default.
*
- * no-onlink - Do not use prefix for onlink determination, clear L-bit in packet.
- * Default is on-link (i.e. - This flag is off and L-bit in packet is set by default and
- * this prefix can be used for on-link determination). 'off-link' also controls
- * the L-bit.
+ * no-onlink - Do not use prefix for onlink determination, clear L-bit
+ * in packet. Default is on-link (i.e. - This flag is off and L-bit in packet
+ * is set by default and this prefix can be used for on-link determination).
+ * 'off-link' also controls the L-bit.
*
*
* Format 3: - Default of Prefix:
*
- * 'ip6 nd [no] prefix / default'
+ * @cliexcmd{ip6 nd [no] prefix / default}
*
- * When a new prefix is added (or existing one is being overwritten) default
- * uses default values for the prefix. If no is used, the default
- * is ignored and the prefix is deleted.
+ * When a new prefix is added (or existing one is being overwritten)
+ * default uses default values for the prefix. If no is
+ * used, the default is ignored and the prefix is deleted.
*
*
* @cliexpar
* Example of how set a router advertisement option:
* @cliexcmd{ip6 nd GigabitEthernet2/0/0 ra-interval 100 20}
* Example of how to add a prefix:
- * @cliexcmd{ip6 nd GigabitEthernet2/0/0 prefix fe80::fe:28ff:fe9c:75b3/64 infinite no-advertise}
+ * @cliexcmd{ip6 nd GigabitEthernet2/0/0 prefix fe80::fe:28ff:fe9c:75b3/64
+ * infinite no-advertise}
* Example of how to delete a prefix:
* @cliexcmd{ip6 nd GigabitEthernet2/0/0 no prefix fe80::fe:28ff:fe9c:75b3/64}
?*/