X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fsrmpls%2Fsr_mpls_steering.c;h=c5ddab73ce467a8ee163ef2d9b7e382fb1f7e3e0;hb=30684ac044bbb8e11ef100a24c01eb37ba7a8876;hp=8bb072c8812145198940197f40b2a2a86df37305;hpb=f3a3bad8006afb0b379761dfe4d5d25de07b32cc;p=vpp.git diff --git a/src/vnet/srmpls/sr_mpls_steering.c b/src/vnet/srmpls/sr_mpls_steering.c index 8bb072c8812..c5ddab73ce4 100755 --- a/src/vnet/srmpls/sr_mpls_steering.c +++ b/src/vnet/srmpls/sr_mpls_steering.c @@ -393,22 +393,16 @@ sr_mpls_steering_policy_add (mpls_label_t bsid, u32 table_id, memset (&key, 0, sizeof (sr_mpls_steering_key_t)); - /* Compute the steer policy key */ - if (traffic_type == SR_STEER_IPV4 || traffic_type == SR_STEER_IPV6) - { - key.prefix.as_u64[0] = prefix->as_u64[0]; - key.prefix.as_u64[1] = prefix->as_u64[1]; - key.mask_width = mask_width; - key.fib_table = (table_id != (u32) ~ 0 ? table_id : 0); - } - else + if (traffic_type != SR_STEER_IPV4 && traffic_type != SR_STEER_IPV6) return -1; + /* Compute the steer policy key */ + key.prefix.as_u64[0] = prefix->as_u64[0]; + key.prefix.as_u64[1] = prefix->as_u64[1]; + key.mask_width = mask_width; + key.fib_table = (table_id != (u32) ~ 0 ? table_id : 0); key.traffic_type = traffic_type; - if (traffic_type != SR_STEER_IPV4 && traffic_type != SR_STEER_IPV6) - return -1; - /* * Search for steering policy. If already exists we are adding a new * color.