frenetic-lang/frenetic

Bug in Learning Switch Application

Closed this issue · 0 comments

Hello.
I found that, src/lang/python/frenetic/examples/learning.py has a bug.

In function switch_policy this line

60      return known_pol | Filter(unknown_pred) >> (SendToController("learning_controller") | flood(sw))

says that packet with unkown_pred will be flooded.

unknown_pred means unknown source mac, but you really need to flood unknown destination mac.
Ye
So I think the right way will be write following :

60      return known_pol | Filter(unknown_source) >> SendToController("learning_controller") | Filter(unknown_destination) >> flood(sw)