Hi Amaresh,

Since I was the author of the change I should probably chime in :) 

The change that you mention was aimed to simplify vppctl and remove its 
dependency on the VPP libraries - there are a few use cases where the vppctl 
would be in a different container - thus not having to install extra 
dependencies there was a good idea both security and maintenance wise. 

We have always discouraged exposing the VPP interface over the IP, because this 
comes with a *lot* of security questions to take care of. Also - debug CLI is 
not really a “production-grade” way of interacting with VPP and is mostly 
intended for debugging. So, when I was doing the simplification for vppctl, I 
opted to only implement AF_UNIX.

Why are you trying to use AF_INET (even on localhost) instead of a more secure 
AF_UNIX ?

--a

> On 18 Jul 2022, at 17:53, Amaresh Parida <parida.amar...@gmail.com> wrote:
> 
> 
> Hi Ben,
> 
> Thank you for your response.
> Actually in one of the usecase I was trying to execute few vpp command from 
> host using vppctl and  not really want to go to vpp terminal with telnet and 
> execute the command. I see it was working earlier and the below check in 
> change the behavior. I am not sure why...
> 
>  
> "https://github.com/FDio/vpp/commit/31f192434660a6fe71663fd62172cb82fc79ede1"; 
> 
> Thanks,
> Amaresh 
> 
>> On Mon, Jul 18, 2022, 18:28 Benoit Ganne (bganne) via lists.fd.io 
>> <bganne=cisco....@lists.fd.io> wrote:
>> Not sure if that is what you are looking for, but in that case, I just use 
>> plain telnet to connect to VPP, as "telnet localhost 5002".
>> No need for vppctl in that case.
>> 
>> ben
>> 
>> > -----Original Message-----
>> > From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Amaresh
>> > Parida
>> > Sent: Saturday, July 16, 2022 4:32
>> > To: vpp-dev@lists.fd.io
>> > Subject: Re: [vpp-dev] Facing issue with cli-listen option in vpp.conf
>> > 
>> > Hi All,
>> > Any inputs on the below query will be very helpful.
>> > 
>> > Thanks,
>> > Amaresh
>> > 
>> > On Fri, Jul 15, 2022, 14:42 Amaresh Parida via lists.fd.io
>> > <http://lists.fd.io>  <parida.amaresh=gmail....@lists.fd.io
>> > <mailto:gmail....@lists.fd.io> > wrote:
>> > 
>> > 
>> >       Hi All
>> > 
>> >       This is regarding the cli-listen option in vpp.conf.
>> >       I want to use cli-listen localhost:5002 instead  of cli-listen
>> > /run/vpp/cli.sock
>> >       After VPP start when I execute vppctl command, I see following
>> > error in VPP
>> > 
>> >       CLI# vppctl  -s localhost:5002
>> >       connect: No such file or directory
>> > 
>> >       When I do a stack trace I found even if I gave localhost:5002
>> > meaning  to connect to TCP socket listen on 5002 for cli,
>> >       it consider it as unix socket and takes the input as unix file (It
>> > should have been connected to TCP socket)
>> >       I can see the port 5002 is opened and in listen mode and I could
>> > able to do a telnet.
>> > 
>> >       But vppctl fails
>> > 
>> > 
>> > 
>> > 
>> > 
>> >       Any suggestions?
>> > 
>> >       Thanks,
>> >       Amaresh
>> > 
>> > 
>> > 
>> 
>> 
>> 
>> 
> 
> 
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21680): https://lists.fd.io/g/vpp-dev/message/21680
Mute This Topic: https://lists.fd.io/mt/92397125/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to