Hi Ben,

Thanks.  That's indeed the problem.

The version I am using is Open vSwitch 1.1.0pre2, with last git commit
3569d18f47f49c115d80033a3661ad31c13d06c9.

I have changed my code to handle this.  Your fix works too (I checked
in wireshark).  Thanks.

Regards
KK

PS>> Thanks.  I have not read the article myself.



On 7 February 2011 09:54, Ben Pfaff <b...@nicira.com> wrote:
> On Mon, Feb 07, 2011 at 01:54:53AM -0800, kk yap wrote:
>> I am using OpenvSwitch kernel datapath with openflowd.  When I connect
>> the kernel datapath path to the controller, the controller (written in
>> Python) sends a features reply with a list of ports.  In that list of
>> ports, I have added eth1 to the datapath, but the name of the port is
>> "eth1\u0001".
>>
>> I am wondering why there is a unicode following the name?  Is that any
>> reason for this?  The internal port "dp0" does not seem to have that
>> problem.
>
> I don't see how a stray \001 could end up in there before the null
> terminator.  I do see that we weren't properly zeroing the whole field,
> so garbage could sneak in after the null terminator.  Here is a patch
> against current master (you didn't mention a version) that should fix
> that.  Can you try it out?
>
> Thanks,
>
> Ben.
>
> P.S. I see that your research is mentioned in the latest issue of
>     Discover Magazine.  Congrats on that.
>
> --8<--------------------------cut here-------------------------->8--
>
> From f2e8aca5ac0b1da274e2aedf72bf928982fcc995 Mon Sep 17 00:00:00 2001
> From: Ben Pfaff <b...@nicira.com>
> Date: Mon, 7 Feb 2011 09:52:42 -0800
> Subject: [PATCH] ofproto: Clear out entire 'name' field of ofp_phy_port when 
> initializing.
>
> Sometimes garbage could appear in the name field following the port name,
> since it wasn't completely zeroed.
>
> Reported-by: kk yap <yap...@openvswitch.org>
> ---
>  ofproto/ofproto.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
> index 5ca41ad..100240d 100644
> --- a/ofproto/ofproto.c
> +++ b/ofproto/ofproto.c
> @@ -1155,7 +1155,7 @@ make_ofport(const struct dpif_port *dpif_port)
>         return NULL;
>     }
>
> -    ofport = xmalloc(sizeof *ofport);
> +    ofport = xzalloc(sizeof *ofport);
>     ofport->netdev = netdev;
>     ofport->odp_port = dpif_port->port_no;
>     ofport->opp.port_no = odp_port_to_ofp_port(dpif_port->port_no);
> --
> 1.7.1
>
>

_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org

Reply via email to