contiv / ofnet

Ofnet is openflow networking library
Other
79 stars 73 forks source link

Request to fix a typo in flowmod.go #114

Open vanytsvetkov opened 2 months ago

vanytsvetkov commented 2 months ago

My apologies, however, are you sure that this code should look exactly like it does?

https://github.com/contiv/ofnet/blob/bc1f1f795cad7b0f39d7e243c175ca1c94eeb29e/vendor/github.com/contiv/libOpenflow/openflow13/flowmod.go#L99-L102

Perhaps you wanted to write something like:

        binary.BigEndian.PutUint32(bytes[n:], f.OutPort) 
        n += 4 
        binary.BigEndian.PutUint32(bytes[n:], f.OutGroup) 
        n += 4 

Just check the source code of OpenvSwitch to be completely sure.

        ofm->out_port = ofputil_port_to_ofp11(fm->out_port);
        ofm->out_group = htonl(fm->out_group);
vanytsvetkov commented 2 months ago

Issue in libOpenflow