Comments (6)
すみません、具体的にどういう問題が出るか、もしあればペーストしてもらえますか? trema-dev か Twitter で同じ問題を見たような。。?
from trema-edge.
下記のtwitterです。trema-edgeには、定義はあるけど、未実装?
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>trema-edge(ruby)のMatch.newでipv6_dst_maskに何を書いても反映されてない風味。。どう書くのが正解なのだろう。
— Kenji Ohira (@torus77) June 4, 2013
from trema-edge.
修正した。issues #12 で見直してください
from trema-edge.
"#<TypeError: can't convert IPAddr into Integer>"
"/opt/.../trema-abb78667c386/ruby/trema/message.rb:39:in `pack_flow_mod_msg'"
...
The change broke ipv4_dst/src, likely since they used 'nw_addr_to_i' not 'NUM2UINT'.
from trema-edge.
thanks.
If you're hurry, Please try the following patches:
--- a/ruby/trema/conversion-util.c
+++ b/ruby/trema/conversion-util.c
@@ -177,6 +177,19 @@ ofp_match_to_r_match( const struct ofp_match *match ) {
} \
}
+#define APPEND_OXM_MATCH_IPV4_ADDR_MASK( r_match, at_value, append_oxm_match_f, match ) \
+{ \
+ VALUE r_value = rb_iv_get( r_match, at_value ); \
+ if ( !NIL_P( r_value ) ) { \
+ uint32_t mask = 0; \
+ VALUE r_mask = rb_iv_get( r_match, at_value "_mask" ); \
+ if ( !NIL_P( r_mask ) ) { \
+ mask = nw_addr_to_i( r_mask ); \
+ } \
+ append_oxm_match_f( match, nw_addr_to_i( r_value ), mask ); \
+ } \
+}
+
#define APPEND_OXM_MATCH_IPV6_ADDR( r_match, at_value, append_oxm_match_f, match ) \
{ \
VALUE r_value = rb_iv_get( r_match, at_value ); \
@@ -218,8 +231,8 @@ r_match_to_oxm_match( VALUE r_match, oxm_matches *match ) {
APPEND_OXM_MATCH_UINT8( r_match, "@ip_ecn", append_oxm_match_ip_ecn, match );
APPEND_OXM_MATCH_UINT8( r_match, "@ip_proto", append_oxm_match_ip_proto, match );
- APPEND_OXM_MATCH_UINT32_MASK( r_match, "@ipv4_src", append_oxm_match_ipv4_src, match );
- APPEND_OXM_MATCH_UINT32_MASK( r_match, "@ipv4_dst", append_oxm_match_ipv4_dst, match );
+ APPEND_OXM_MATCH_IPV4_ADDR_MASK( r_match, "@ipv4_src", append_oxm_match_ipv4_src, match );
+ APPEND_OXM_MATCH_IPV4_ADDR_MASK( r_match, "@ipv4_dst", append_oxm_match_ipv4_dst, match );
APPEND_OXM_MATCH_UINT16( r_match, "@tcp_src", append_oxm_match_tcp_src, match );
APPEND_OXM_MATCH_UINT16( r_match, "@tcp_dst", append_oxm_match_tcp_dst, match );
from trema-edge.
This fixes it for both ipv4_* and arp_*.
from trema-edge.
Related Issues (20)
- Dumper.rb の port_status メソッド が正しく動作しない HOT 1
- trema version コマンドの出力 HOT 2
- Multiple table usage error HOT 2
- make失敗およびlearning-switchの実行失敗 HOT 1
- FLOW_MODに使用するバイトオーダ HOT 1
- 生成したフレームをpacket_outのdata:として指定した際にエラーが出力される HOT 5
- ExactMatch.from is not fully implemented yet
- LoggerモジュールがSinatraと衝突して動かない HOT 1
- Trema::Controller::send_list_switches_request is not implemented yet
- send_flow_mod_delete
- Trema::Controller#switch_disconnected is not implemented
- Trema::Match#compare is not implemented
- FlowMultipartRequestがエラーになる HOT 2
- FlowMultipartRequestがエラーになる。 (Ipv4SrcAddr) HOT 1
- action buckets に複数の action を定義できない HOT 2
- OpenFLow 1.3.3 HOT 3
- Write-Action instruction does not allow to modify multiple header fields HOT 1
- TremaEdgeでPioが動作しない HOT 3
- trema-edge does not pass the unit tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trema-edge.