From 483d9a81ea6301d79a4469db66df7ce02f884ce5 Mon Sep 17 00:00:00 2001 From: "watanabe.fumitaka" Date: Thu, 29 Aug 2013 11:50:22 +0900 Subject: [PATCH] packet lib: llc: correct a variable name Signed-off-by: WATANABE Fumitaka Signed-off-by: FUJITA Tomonori --- ryu/lib/packet/llc.py | 4 ++-- ryu/tests/unit/packet/test_packet.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ryu/lib/packet/llc.py b/ryu/lib/packet/llc.py index 2a0926cd..7601dced 100644 --- a/ryu/lib/packet/llc.py +++ b/ryu/lib/packet/llc.py @@ -93,7 +93,7 @@ from . import packet_base from ryu.lib import stringify -SAP_BDPU = 0x42 +SAP_BPDU = 0x42 class llc(packet_base.PacketBase): @@ -317,4 +317,4 @@ class ControlFormatU(stringify.StringifyMixin): return struct.pack(self._PACK_STR, control) -llc.register_packet_type(bpdu.bpdu, SAP_BDPU) +llc.register_packet_type(bpdu.bpdu, SAP_BPDU) diff --git a/ryu/tests/unit/packet/test_packet.py b/ryu/tests/unit/packet/test_packet.py index d8ea0d49..8e70f461 100644 --- a/ryu/tests/unit/packet/test_packet.py +++ b/ryu/tests/unit/packet/test_packet.py @@ -565,7 +565,7 @@ class TestPacket(unittest.TestCase): e = ethernet.ethernet(self.dst_mac, self.src_mac, ether.ETH_TYPE_IEEE802_3) llc_control = llc.ControlFormatU(0, 0, 0) - l = llc.llc(llc.SAP_BDPU, llc.SAP_BDPU, llc_control) + l = llc.llc(llc.SAP_BPDU, llc.SAP_BPDU, llc_control) b = bpdu.ConfigurationBPDUs(flags=0, root_priority=32768, root_system_id_extension=0, @@ -626,8 +626,8 @@ class TestPacket(unittest.TestCase): # llc ok_(p_llc) - eq_(llc.SAP_BDPU, p_llc.dsap_addr) - eq_(llc.SAP_BDPU, p_llc.ssap_addr) + eq_(llc.SAP_BPDU, p_llc.dsap_addr) + eq_(llc.SAP_BPDU, p_llc.ssap_addr) eq_(0, p_llc.control.modifier_function1) eq_(0, p_llc.control.pf_bit) eq_(0, p_llc.control.modifier_function2) @@ -669,8 +669,8 @@ class TestPacket(unittest.TestCase): if k in ctrl_values]) ctrl_str = '%s(%s)' % (llc.ControlFormatU.__name__, _ctrl_str) - llc_values = {'dsap_addr': repr(llc.SAP_BDPU), - 'ssap_addr': repr(llc.SAP_BDPU), + llc_values = {'dsap_addr': repr(llc.SAP_BPDU), + 'ssap_addr': repr(llc.SAP_BPDU), 'control': ctrl_str} _llc_str = ','.join(['%s=%s' % (k, llc_values[k]) for k, v in inspect.getmembers(p_llc)