summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-01-29 14:25:43 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-01-29 14:51:33 +0900
commit1f590c04110d44775de9c27a4bfed23d990b23d4 (patch)
treebba7deceae2b496dec0bddb4150558fc7ae37998
parent84202a856148d87580aa5fa4ca817015a8f810da (diff)
of14: 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> Reviewed-by: Simon Horman <horms@verge.net.au>
-rw-r--r--ryu/ofproto/ofproto_v1_4_parser.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ryu/ofproto/ofproto_v1_4_parser.py b/ryu/ofproto/ofproto_v1_4_parser.py
index 4980d035..38ae25a2 100644
--- a/ryu/ofproto/ofproto_v1_4_parser.py
+++ b/ryu/ofproto/ofproto_v1_4_parser.py
@@ -21,6 +21,7 @@ from ryu.lib import addrconv
from ryu.lib import mac
from ryu import utils
from ofproto_parser import StringifyMixin, MsgBase, msg_pack_into, msg_str_attr
+from . import ether
from . import ofproto_parser
from . import ofproto_common
from . import ofproto_v1_4 as ofproto
@@ -3583,7 +3584,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
@@ -3624,7 +3625,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