summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-01-29 07:16:28 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-01-29 07:20:57 +0900
commitd4c259dace95f1bc0e14fae62541b3ea3936d9d8 (patch)
treeebccd3730093215f03cf7e54a2050f90f8a2e292
parent73a11d44737b61cdd05361851ae73c5bd1525df1 (diff)
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>
-rw-r--r--ryu/ofproto/ofproto_v1_2_parser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ryu/ofproto/ofproto_v1_2_parser.py b/ryu/ofproto/ofproto_v1_2_parser.py
index f592e799..4e55dc0d 100644
--- a/ryu/ofproto/ofproto_v1_2_parser.py
+++ b/ryu/ofproto/ofproto_v1_2_parser.py
@@ -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