Hi Neale, I took a look at the code.
What i believe is being done is the parsing is going from left to right, for say "ip route add add::123/128 via 9001::3", then when the parser encounters a "add", it sets the is_add = 1, flag, so the is_add flag is set two times in this case and hence the ip is not parsed properly. We can just have a check, if the is_add flag is set or not, thus preventing it being set 2 times. I tried to find where i should do this change in the code, but could not get where the cli is being used and called. I tried to modify the vat/api_format.c, which has the "api_ip_add_del_route (vat_main_t * vam)" function but it didnt work. Could you please hint me on how this function was generated. I checked all the format files and api files. I could not find any file where the input string is parsed. Thanks, Pragash Vijayaragavan Grad Student at Rochester Institute of Technology email : pxv3...@rit.edu ph : 585 764 4662 On Thu, Aug 10, 2017 at 9:56 AM, Neale Ranns (nranns) <nra...@cisco.com> wrote: > Hi Pragash, > > > > Yes that’s a bug. > > Could you submit a patch for it – we need to flip the order the ‘add’ > string is parsed from the options so that it comes after parsing the IPv6 > address. > > > > Thanks, > > neale > > > > *From: *Pragash Vijayaragavan <pxv3...@rit.edu> > *Reply-To: *"pxv3...@rit.edu" <pxv3...@rit.edu> > *Date: *Thursday, 10 August 2017 at 14:47 > *To: *"vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io> > *Cc: *"Neale Ranns (nranns)" <nra...@cisco.com>, "John Marshall (jwm)" < > j...@cisco.com>, Minseok Kwon <mxk...@rit.edu> > *Subject: *ip6 route add bug > > > > Hi, > > > > When i add the following ip6 route, which starts with "add", the "add" is > ignored and the rest of the ip is added. > > > > Is this a bug? > > > > You can check the outputs below. > > > > This is in 17.07-rc0. > > > > > > *vpp# ip route add add:9538:44f8::/45 via 9000::1* > > > > vpp# sh ip6 fib > > ipv6-VRF:0, fib_index 0, flow hash: > > ::/0 > > unicast-ip6-chain > > [@0]: dpo-load-balance: [index:5 buckets:1 uRPF:5 to:[0:0]] > > [0] [@0]: dpo-drop ip6 > > 9000::1/128 > > unicast-ip6-chain > > [@0]: dpo-load-balance: [index:8 buckets:1 uRPF:5 to:[0:0]] > > [0] [@0]: dpo-drop ip6 > > *9538:44f8::/45* > > unicast-ip6-chain > > [@0]: dpo-load-balance: [index:9 buckets:1 uRPF:7 to:[0:0]] > > load-balance-map: index:0 buckets:1 > > index: 0 > > map: 0 > > [0] [@6]: dpo-load-balance: [index:8 buckets:1 uRPF:5 to:[0:0]] > > [0] [@0]: dpo-drop ip6 > > fe80::/10 > > unicast-ip6-chain > > [@0]: dpo-load-balance: [index:6 buckets:1 uRPF:6 to:[0:0]] > > [0] [@2]: dpo-receive > > > > > > Is this fixed in 17.10. > > > > > > > Thanks, > > > > Pragash Vijayaragavan > > Grad Student at Rochester Institute of Technology > > email : pxv3...@rit.edu > > ph : 585 764 4662 <(585)%20764-4662> > > > >
_______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev