summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2019-07-25 17:57:07 +0200
committerGitHub <noreply@github.com>2019-07-25 17:57:07 +0200
commit51e75ed2280cb5e3e1a4fcf98240c1f1eab24d9a (patch)
tree74897844742c7165ad8bdda3c0f972764b4662ad
parentMerge pull request #4691 from donaldsharp/pim_upstream_ref (diff)
parentlib: fix missing M:A:C to X:X:X:X:X:X changes (diff)
downloadfrr-51e75ed2280cb5e3e1a4fcf98240c1f1eab24d9a.tar.xz
frr-51e75ed2280cb5e3e1a4fcf98240c1f1eab24d9a.zip
Merge pull request #4730 from idryzhov/fix
lib: fix missing M:A:C to X:X:X:X:X:X changes
-rw-r--r--doc/developer/cli.rst42
-rw-r--r--zebra/zebra_vty.c8
2 files changed, 24 insertions, 26 deletions
diff --git a/doc/developer/cli.rst b/doc/developer/cli.rst
index c0716a5c9..cf35b03f0 100644
--- a/doc/developer/cli.rst
+++ b/doc/developer/cli.rst
@@ -160,27 +160,27 @@ parser, but this is merely a dumb copy job.
Here is a brief summary of the various token types along with examples.
-+-----------------+-----------------+-------------------------------------------------------------+
-| Token type | Syntax | Description |
-+=================+=================+=============================================================+
-| ``WORD`` | ``show ip bgp`` | Matches itself. In the given example every token is a WORD. |
-+-----------------+-----------------+-------------------------------------------------------------+
-| ``IPV4`` | ``A.B.C.D`` | Matches an IPv4 address. |
-+-----------------+-----------------+-------------------------------------------------------------+
-| ``IPV6`` | ``X:X::X:X`` | Matches an IPv6 address. |
-+-----------------+-----------------+-------------------------------------------------------------+
-| ``IPV4_PREFIX`` | ``A.B.C.D/M`` | Matches an IPv4 prefix in CIDR notation. |
-+-----------------+-----------------+-------------------------------------------------------------+
-| ``IPV6_PREFIX`` | ``X:X::X:X/M`` | Matches an IPv6 prefix in CIDR notation. |
-+-----------------+-----------------+-------------------------------------------------------------+
-| ``MAC`` | ``M:A:C`` | Matches a 48-bit mac address. |
-+-----------------+-----------------+-------------------------------------------------------------+
-| ``MAC_PREFIX`` | ``M:A:C/M`` | Matches a 48-bit mac address with a mask. |
-+-----------------+-----------------+-------------------------------------------------------------+
-| ``VARIABLE`` | ``FOOBAR`` | Matches anything. |
-+-----------------+-----------------+-------------------------------------------------------------+
-| ``RANGE`` | ``(X-Y)`` | Matches numbers in the range X..Y inclusive. |
-+-----------------+-----------------+-------------------------------------------------------------+
++-----------------+-------------------+-------------------------------------------------------------+
+| Token type | Syntax | Description |
++=================+===================+=============================================================+
+| ``WORD`` | ``show ip bgp`` | Matches itself. In the given example every token is a WORD. |
++-----------------+-------------------+-------------------------------------------------------------+
+| ``IPV4`` | ``A.B.C.D`` | Matches an IPv4 address. |
++-----------------+-------------------+-------------------------------------------------------------+
+| ``IPV6`` | ``X:X::X:X`` | Matches an IPv6 address. |
++-----------------+-------------------+-------------------------------------------------------------+
+| ``IPV4_PREFIX`` | ``A.B.C.D/M`` | Matches an IPv4 prefix in CIDR notation. |
++-----------------+-------------------+-------------------------------------------------------------+
+| ``IPV6_PREFIX`` | ``X:X::X:X/M`` | Matches an IPv6 prefix in CIDR notation. |
++-----------------+-------------------+-------------------------------------------------------------+
+| ``MAC`` | ``X:X:X:X:X:X`` | Matches a 48-bit mac address. |
++-----------------+-------------------+-------------------------------------------------------------+
+| ``MAC_PREFIX`` | ``X:X:X:X:X:X/M`` | Matches a 48-bit mac address with a mask. |
++-----------------+-------------------+-------------------------------------------------------------+
+| ``VARIABLE`` | ``FOOBAR`` | Matches anything. |
++-----------------+-------------------+-------------------------------------------------------------+
+| ``RANGE`` | ``(X-Y)`` | Matches numbers in the range X..Y inclusive. |
++-----------------+-------------------+-------------------------------------------------------------+
When presented with user input, the parser will search over all defined
commands in the current context to find a match. It is aware of the various
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 74baabbf2..4d18045fb 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -2383,7 +2383,7 @@ DEFUN (show_pbr_iptable,
DEFPY (clear_evpn_dup_addr,
clear_evpn_dup_addr_cmd,
- "clear evpn dup-addr vni <all$vni_all |" CMD_VNI_RANGE"$vni [mac M:A:C$mac_val | ip <A.B.C.D|X:X::X:X>]>",
+ "clear evpn dup-addr vni <all$vni_all |" CMD_VNI_RANGE"$vni [mac X:X:X:X:X:X | ip <A.B.C.D|X:X::X:X>]>",
CLEAR_STR
"EVPN\n"
"Duplicate address \n"
@@ -2398,16 +2398,14 @@ DEFPY (clear_evpn_dup_addr,
{
struct zebra_vrf *zvrf;
struct ipaddr host_ip = {.ipa_type = IPADDR_NONE };
- struct ethaddr mac_addr;
int ret = CMD_SUCCESS;
zvrf = zebra_vrf_get_evpn();
if (vni_str) {
- if (mac_val) {
- prefix_str2mac(mac_val, &mac_addr);
+ if (mac) {
ret = zebra_vxlan_clear_dup_detect_vni_mac(vty, zvrf,
vni,
- &mac_addr);
+ &mac->eth_addr);
} else if (ip) {
if (sockunion_family(ip) == AF_INET) {
host_ip.ipa_type = IPADDR_V4;