mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-05 20:36:10 +02:00
Add workaround to switch_features_handler for OF1.3
hacky workaround, will be removed. OF1.3 doesn't have ports. An application should not depend on them. But there might be such bad applications so let's keep this workaround for while. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
2bd4e3003c
commit
4152e5d229
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2011 Nippon Telegraph and Telephone Corporation.
|
||||
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
|
||||
# Copyright (C) 2011 Isaku Yamahata <yamahata at valinux co jp>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
||||
@ -82,7 +82,13 @@ class OFPHandler(app_manager.RyuApp):
|
||||
LOG.debug('switch features ev %s', msg)
|
||||
|
||||
datapath.id = msg.datapath_id
|
||||
datapath.ports = msg.ports
|
||||
|
||||
# hacky workaround, will be removed. OF1.3 doesn't have
|
||||
# ports. An application should not depend on them. But there
|
||||
# might be such bad applications so keep this workaround for
|
||||
# while.
|
||||
if datapath.ofproto.OFP_VERSION < 0x04:
|
||||
datapath.ports = msg.ports
|
||||
|
||||
ofproto = datapath.ofproto
|
||||
ofproto_parser = datapath.ofproto_parser
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user