ofnet
ofnet copied to clipboard
Adding support for the ovs-switches that support > OF1.3
Hi,
Itl looks like the controller does not support the ovs switches that has support for > OF 1.3. I have the fix for it. But, I can't push to the branch.
Please let me know so that I can add the support.
Thanks Chakri
From 0e852aebc5147fef764b74eb44fcf861b466e3d4 Mon Sep 17 00:00:00 2001 From: Chakri [email protected] Date: Thu, 22 Aug 2019 20:09:51 -0700 Subject: [PATCH] Adding support for the ovs-switches that support > OF1.3
ofctrl/ofctrl.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/ofctrl/ofctrl.go b/ofctrl/ofctrl.go index f9c1a34..727a5d7 100755 --- a/ofctrl/ofctrl.go +++ b/ofctrl/ofctrl.go @@ -131,8 +131,8 @@ func (c *Controller) handleConnection(conn net.Conn) { // types are incompatable, it is possible the // connection may be servered without error. case *common.Hello:
-
if m.Version == openflow13.VERSION {
-
log.Infoln("Received Openflow 1.3 Hello message")
-
if m.Version >= openflow13.VERSION {
-
log.Infoln("Received Openflow >= 1.3 Hello message") // Version negotiation is // considered complete. Create // new Switch and notifiy listening
@@ -179,10 +179,9 @@ func (c *Controller) handleConnection(conn net.Conn) {
// Demux based on message version func (c *Controller) Parse(b []byte) (message util.Message, err error) {
- switch b[0] {
- case openflow13.VERSION:
- if b[0] >= openflow13.VERSION { message, err = openflow13.Parse(b)
- default:
- } else { log.Errorf("Received unsupported openflow version: %d", b[0]) } return -- 2.7.4