Hi,

I was working on OVS 1.2.2 and found malformed error packet.

Bug Description
Error packet generated by switch for FLOW_MOD_FAILED is coming as malformed on 
traffic analyzer (wireshark with openflow plugin)

 * What you did that make the problem appear?

  1. I made following bridge.
------------------------------------
e999897a-932f-4a57-81ce-252adc12cce9
    Bridge "br0"
       Controller "ptcp:6633"
        fail_mode: secure
        Port "br0"
            Interface "br0"
                type: internal
        Port "em1"
            Interface "em1"
        Port "vnet0"
            Interface "vnet0"

2. On controller ofctl
a. Modify the OFPFC_ADD variable  in ofp_flow_mod_command enum in file 
include/openflow/openflow.h
                    OFPFC_ADD= 6,
b. make install
c. ovs-ofctl add-flow tcp:<switch ip>:6633 "dl_type=0x0806 actions=DROP"

3. The error packet generated by Switch with code =Problem modifying flow entry 
(3) and type = Unknown command (4) is coming as malformed on traffic analyzer.

* What you expected to happen?
The error packet should not come as malformed.

* What actually happened.
The error packet is coming as malformed

* The Open vSwitch version number (as output by "ovs-vswitchd
    --version").
------------------------
# ovs-vswitchd --version
ovs-vswitchd (Open vSwitch) 1.2.2
Compiled May 21 2012 11:23:22
OpenFlow versions 0x1:0x1
--------------------------------

* The Git commit number (as output by "git rev-parse HEAD"),
   if you built from a Git snapshot.
   Not from git.

 * Any local patches or changes you have applied (if any).
   No patches are applied.

 * The kernel version on which Open vSwitch is running (from
   /proc/version) and the distribution and version number of
   your OS (e.g. "Centos 5.0").
   Distribution is Fedora 15.
   kernel is:
   Linux version 2.6.38.6-26.rc1.fc15.x86_64 
(mockbu...@x86-04.phx2.fedoraproject.org<mailto:mockbu...@x86-04.phx2.fedoraproject.org>)
 (gcc version 4.6.0 20110428 (Red Hat 4.6.0-6) (GCC) ) #1 SMP Mon May 9 
20:45:15 UTC 2011

* The output of "ovs-dpctl show"
system@br0:
                lookups: frags:0, hit:8653, missed:3144, lost:0
                port 0: br0 (internal)
                port 1: em1
                port 3: vent0

* If you have Open vSwitch configured to connect to an
   OpenFlow controller, the output of "ovs-ofctl show <bridge>"
   for each <bridge> configured in the vswitchd configuration
   database.
# ovs-ofctl show br0
OFPT_FEATURES_REPLY (xid=0x1): ver:0x1, dpid:00002c27d71aec58
n_tables:1, n_buffers:256
features: capabilities:0x87, actions:0xfff
 1(em1): addr:2c:27:d7:1a:ec:58
     config:     0
     state:      0
     current:    100MB-FD COPPER AUTO_NEG
     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG
     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG
 3(vnet0): addr:fe:54:00:a1:59:5f
     config:     0
     state:      0
     current:    10MB-FD COPPER
 LOCAL(br0): addr:2c:27:d7:1a:ec:58
     config:     0
     state:      0
OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0

* A fix or workaround, if you have one.
 We have a tested workaround for this issue.

Workaround Approach:
As per openflow 1.0 spec "data" contains at "least" first 64 bytes of failed 
request. This is working correct also in current OVS 1.2.2 code.
But it is taking an extra check in code (lib/ofp-util.c) on "data" length that:-
if data is greater than 64 bytes then it would be truncated to 64 bytes which 
is making this packet as malformed. OVS code is working on "at most" 64 bytes 
length instead of "at least" 64 bytes.

To avoid the truncation of 'data field ' to 64 bytes, the condition to check 
the length of data field  in file  (lib/ofp-util.c), routine 
ofputil_encode_error_msg can be removed.

* Any other information that you think might be relevant.
Same issue has been found on latest release OVS 1.4.1

Regards,
Prabina



DISCLAIMER:

-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and
intended

for the named recipient(s) only. 

It shall not attach any liability on the originator or NECHCL or its

affiliates. Any views or opinions presented in 

this email are solely those of the author and may not necessarily reflect the

opinions of NECHCL or its affiliates. 

Any form of reproduction, dissemination, copying, disclosure, modification,

distribution and / or publication of 

this message without the prior written consent of the author of this e-mail is

strictly prohibited. If you have 

received this email in error please delete it and notify the sender

immediately. .

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

Reply via email to