diff options
author | Ahmed Abdelsalam <ahabdels@cisco.com> | 2019-10-08 16:27:34 +0000 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2019-10-27 10:01:34 +0000 |
commit | 31c31c25e92435b24b321615266b8ad9d5d2d1aa (patch) | |
tree | 6f70a6594a66021536d0d32ff9aad9941b919657 /src/vnet | |
parent | 86a247310c73922166cce604ecf7cc12f4115aad (diff) |
sr: fix deleting an SR l2 steering policy
Type: fix
Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
Change-Id: I9e98b1622785e58484bf316ef491e44cfb06bcb7
(cherry picked from commit a6b93eac5979f1f1166cdf6f8bfa216b243b2662)
Diffstat (limited to 'src/vnet')
-rwxr-xr-x | src/vnet/srv6/sr_steering.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vnet/srv6/sr_steering.c b/src/vnet/srv6/sr_steering.c index 66186e9fca8..566ba1fe5a0 100755 --- a/src/vnet/srv6/sr_steering.c +++ b/src/vnet/srv6/sr_steering.c @@ -135,9 +135,13 @@ sr_steering_policy (int is_del, ip6_address_t * bsid, u32 sr_policy_index, else if (steer_pl->classify.traffic_type == SR_STEER_L2) { /* Remove HW redirection */ - vnet_feature_enable_disable ("device-input", - "sr-policy-rewrite-encaps-l2", - sw_if_index, 0, 0, 0); + int ret = vnet_feature_enable_disable ("device-input", + "sr-pl-rewrite-encaps-l2", + sw_if_index, 0, 0, 0); + + if (ret != 0) + return -1; + sm->sw_iface_sr_policies[sw_if_index] = ~(u32) 0; /* Remove promiscous mode from interface */ |