of12: set default ethernet types for MPLS actions

0x8847 (MPLS) for PUSH_MPLS
0x0800 (IP) for POP_MPLS

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
FUJITA Tomonori 2014-01-29 07:16:28 +09:00
parent 73a11d4473
commit d4c259dace

View File

@ -1383,7 +1383,7 @@ class OFPActionPushMpls(OFPAction):
ethertype Ether type
================ ======================================================
"""
def __init__(self, ethertype, type_=None, len_=None):
def __init__(self, ethertype=ether.ETH_TYPE_MPLS, type_=None, len_=None):
super(OFPActionPushMpls, self).__init__()
self.ethertype = ethertype
@ -1424,7 +1424,7 @@ class OFPActionPopMpls(OFPAction):
This action pops the MPLS header from the packet.
"""
def __init__(self, ethertype, type_=None, len_=None):
def __init__(self, ethertype=ether.ETH_TYPE_IP, type_=None, len_=None):
super(OFPActionPopMpls, self).__init__()
self.ethertype = ethertype