Skip to content

Commit 51e75ed

Browse files
authored
Merge pull request #4730 from idryzhov/fix
lib: fix missing M:A:C to X:X:X:X:X:X changes
2 parents e72ce28 + f65d330 commit 51e75ed

File tree

2 files changed

+24
-26
lines changed

2 files changed

+24
-26
lines changed

doc/developer/cli.rst

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -160,27 +160,27 @@ parser, but this is merely a dumb copy job.
160160

161161
Here is a brief summary of the various token types along with examples.
162162

163-
+-----------------+-----------------+-------------------------------------------------------------+
164-
| Token type | Syntax | Description |
165-
+=================+=================+=============================================================+
166-
| ``WORD`` | ``show ip bgp`` | Matches itself. In the given example every token is a WORD. |
167-
+-----------------+-----------------+-------------------------------------------------------------+
168-
| ``IPV4`` | ``A.B.C.D`` | Matches an IPv4 address. |
169-
+-----------------+-----------------+-------------------------------------------------------------+
170-
| ``IPV6`` | ``X:X::X:X`` | Matches an IPv6 address. |
171-
+-----------------+-----------------+-------------------------------------------------------------+
172-
| ``IPV4_PREFIX`` | ``A.B.C.D/M`` | Matches an IPv4 prefix in CIDR notation. |
173-
+-----------------+-----------------+-------------------------------------------------------------+
174-
| ``IPV6_PREFIX`` | ``X:X::X:X/M`` | Matches an IPv6 prefix in CIDR notation. |
175-
+-----------------+-----------------+-------------------------------------------------------------+
176-
| ``MAC`` | ``M:A:C`` | Matches a 48-bit mac address. |
177-
+-----------------+-----------------+-------------------------------------------------------------+
178-
| ``MAC_PREFIX`` | ``M:A:C/M`` | Matches a 48-bit mac address with a mask. |
179-
+-----------------+-----------------+-------------------------------------------------------------+
180-
| ``VARIABLE`` | ``FOOBAR`` | Matches anything. |
181-
+-----------------+-----------------+-------------------------------------------------------------+
182-
| ``RANGE`` | ``(X-Y)`` | Matches numbers in the range X..Y inclusive. |
183-
+-----------------+-----------------+-------------------------------------------------------------+
163+
+-----------------+-------------------+-------------------------------------------------------------+
164+
| Token type | Syntax | Description |
165+
+=================+===================+=============================================================+
166+
| ``WORD`` | ``show ip bgp`` | Matches itself. In the given example every token is a WORD. |
167+
+-----------------+-------------------+-------------------------------------------------------------+
168+
| ``IPV4`` | ``A.B.C.D`` | Matches an IPv4 address. |
169+
+-----------------+-------------------+-------------------------------------------------------------+
170+
| ``IPV6`` | ``X:X::X:X`` | Matches an IPv6 address. |
171+
+-----------------+-------------------+-------------------------------------------------------------+
172+
| ``IPV4_PREFIX`` | ``A.B.C.D/M`` | Matches an IPv4 prefix in CIDR notation. |
173+
+-----------------+-------------------+-------------------------------------------------------------+
174+
| ``IPV6_PREFIX`` | ``X:X::X:X/M`` | Matches an IPv6 prefix in CIDR notation. |
175+
+-----------------+-------------------+-------------------------------------------------------------+
176+
| ``MAC`` | ``X:X:X:X:X:X`` | Matches a 48-bit mac address. |
177+
+-----------------+-------------------+-------------------------------------------------------------+
178+
| ``MAC_PREFIX`` | ``X:X:X:X:X:X/M`` | Matches a 48-bit mac address with a mask. |
179+
+-----------------+-------------------+-------------------------------------------------------------+
180+
| ``VARIABLE`` | ``FOOBAR`` | Matches anything. |
181+
+-----------------+-------------------+-------------------------------------------------------------+
182+
| ``RANGE`` | ``(X-Y)`` | Matches numbers in the range X..Y inclusive. |
183+
+-----------------+-------------------+-------------------------------------------------------------+
184184

185185
When presented with user input, the parser will search over all defined
186186
commands in the current context to find a match. It is aware of the various

zebra/zebra_vty.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2383,7 +2383,7 @@ DEFUN (show_pbr_iptable,
23832383

23842384
DEFPY (clear_evpn_dup_addr,
23852385
clear_evpn_dup_addr_cmd,
2386-
"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>]>",
2386+
"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>]>",
23872387
CLEAR_STR
23882388
"EVPN\n"
23892389
"Duplicate address \n"
@@ -2398,16 +2398,14 @@ DEFPY (clear_evpn_dup_addr,
23982398
{
23992399
struct zebra_vrf *zvrf;
24002400
struct ipaddr host_ip = {.ipa_type = IPADDR_NONE };
2401-
struct ethaddr mac_addr;
24022401
int ret = CMD_SUCCESS;
24032402

24042403
zvrf = zebra_vrf_get_evpn();
24052404
if (vni_str) {
2406-
if (mac_val) {
2407-
prefix_str2mac(mac_val, &mac_addr);
2405+
if (mac) {
24082406
ret = zebra_vxlan_clear_dup_detect_vni_mac(vty, zvrf,
24092407
vni,
2410-
&mac_addr);
2408+
&mac->eth_addr);
24112409
} else if (ip) {
24122410
if (sockunion_family(ip) == AF_INET) {
24132411
host_ip.ipa_type = IPADDR_V4;

0 commit comments

Comments
 (0)