{"action":"created","issue":{"url":"https://api.github.com/repos/frenetic-lang/frenetic/issues/463","labels_url":"https://api.github.com/repos/frenetic-lang/frenetic/issues/463/labels{/name}","comments_url":"https://api.github.com/repos/frenetic-lang/frenetic/issues/463/comments","events_url":"https://api.github.com/repos/frenetic-lang/frenetic/issues/463/events","html_url":"https://github.com/frenetic-lang/frenetic/issues/463","id":122758288,"number":463,"title":"FDD Leaf Nodes Generating Un-constrained Drop Rules","user":{"login":"craig-riecke","id":542931,"avatar_url":"https://avatars.githubusercontent.com/u/542931?v=3","gravatar_id":"","url":"https://api.github.com/users/craig-riecke","html_url":"https://github.com/craig-riecke","followers_url":"https://api.github.com/users/craig-riecke/followers","following_url":"https://api.github.com/users/craig-riecke/following{/other_user}","gists_url":"https://api.github.com/users/craig-riecke/gists{/gist_id}","starred_url":"https://api.github.com/users/craig-riecke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craig-riecke/subscriptions","organizations_url":"https://api.github.com/users/craig-riecke/orgs","repos_url":"https://api.github.com/users/craig-riecke/repos","events_url":"https://api.github.com/users/craig-riecke/events{/privacy}","received_events_url":"https://api.github.com/users/craig-riecke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-17T15:31:07Z","updated_at":"2015-12-17T18:02:57Z","closed_at":null,"body":"I'm sending over NetKAT that generates the following flow table:\r\n\r\n```\r\n+-----------------------------------------------------+\r\n| 95073481681482 | Pattern  | Action                  |\r\n|-----------------------------------------------------|\r\n| IP4Dst = 192.168.56.1     | Output(Controller(128)) |\r\n| EthType = 0x806 (arp)     |                         |\r\n|-----------------------------------------------------|\r\n| IP4Dst = 192.168.56.1     |                         |\r\n|-----------------------------------------------------|\r\n| InPort = 1                | Output(Controller(128)) |\r\n| IP4Dst = 192.168.57.0/24  |                         |\r\n| IP4Src = 192.168.56.100   |                         |\r\n| EthType = 0x800 (ip)      |                         |\r\n|-----------------------------------------------------|\r\n| IP4Dst = 192.168.57.0/24  |                         |\r\n|-----------------------------------------------------|\r\n| IP4Dst = 192.168.156.0/24 | Output(Controller(128)) |\r\n| EthType = 0x806 (arp)     |                         |\r\n|-----------------------------------------------------|\r\n| IP4Dst = 192.168.156.0/24 |                         |\r\n|-----------------------------------------------------|\r\n| InPort = 1                | Output(Controller(128)) |\r\n| IP4Dst = 192.168.157.0/24 |                         |\r\n| EthType = 0x800 (ip)      |                         |\r\n|-----------------------------------------------------|\r\n| IP4Dst = 192.168.157.0/24 |                         |\r\n|-----------------------------------------------------|\r\n| IP4Dst = 192.168.158.0/24 | Output(Controller(128)) |\r\n| EthType = 0x806 (arp)     |                         |\r\n|-----------------------------------------------------|\r\n| IP4Dst = 192.168.158.0/24 |                         |\r\n|-----------------------------------------------------|\r\n| InPort = 1                | Output(Controller(128)) |\r\n| IP4Dst = 192.168.159.0/24 |                         |\r\n| EthType = 0x800 (ip)      |                         |\r\n|-----------------------------------------------------|\r\n| IP4Dst = 192.168.159.0/24 |                         |\r\n|-----------------------------------------------------|\r\n| IP4Dst = 192.168.160.0/24 | Output(Controller(128)) |\r\n| EthType = 0x806 (arp)     |                         |\r\n|-----------------------------------------------------|\r\n| IP4Dst = 192.168.160.0/24 |                         |\r\n|-----------------------------------------------------|\r\n| InPort = 1                | Output(Controller(128)) |\r\n| IP4Dst = 192.168.161.0/24 |                         |\r\n| EthType = 0x800 (ip)      |                         |\r\n|-----------------------------------------------------|\r\n|                           |                         |\r\n+-----------------------------------------------------+\r\n```\r\n\r\nThe rules that look like \"condition\" -> drop (no actions) are artifacts of FDD complilation.  If this generated the right flow table in OpenFlow, it'd be fine ... the drop rules have lower priority than the ones above it, and are therefore not fired under the right circumstances.  But on OpenVSwitch, here's the flow table:\r\n\r\n```\r\npriority=65535,arp,arp_tpa=192.168.56.1 actions=CONTROLLER:128\r\npriority=65534 actions=drop\r\npriority=65533,ip,in_port=1,nw_src=192.168.56.100,nw_dst=192.168.57.0/24 actions=CONTROLLER:128\r\npriority=65531,arp,arp_tpa=192.168.156.0/24 actions=CONTROLLER:128\r\npriority=65532 actions=drop\r\npriority=65530 actions=drop\r\npriority=65529,ip,in_port=1,nw_dst=192.168.157.0/24 actions=CONTROLLER:128\r\npriority=65528 actions=drop\r\npriority=65527,arp,arp_tpa=192.168.158.0/24 actions=CONTROLLER:128\r\npriority=65526 actions=drop\r\npriority=65525,ip,in_port=1,nw_dst=192.168.159.0/24 actions=CONTROLLER:128\r\npriority=65524 actions=drop\r\npriority=65523,arp,arp_tpa=192.168.160.0/24 actions=CONTROLLER:128\r\npriority=65522 actions=drop\r\npriority=65521,ip,in_port=1,nw_dst=192.168.161.0/24 actions=CONTROLLER:128\r\npriority=65520 actions=drop\r\n```\r\n\r\nBecause the rule in 65534 does not have a condition, it's catching all the packets that don't fit rule 65535 and dropping them.   "},"comment":{"url":"https://api.github.com/repos/frenetic-lang/frenetic/issues/comments/165533012","html_url":"https://github.com/frenetic-lang/frenetic/issues/463#issuecomment-165533012","issue_url":"https://api.github.com/repos/frenetic-lang/frenetic/issues/463","id":165533012,"user":{"login":"smolkaj","id":6642034,"avatar_url":"https://avatars.githubusercontent.com/u/6642034?v=3","gravatar_id":"","url":"https://api.github.com/users/smolkaj","html_url":"https://github.com/smolkaj","followers_url":"https://api.github.com/users/smolkaj/followers","following_url":"https://api.github.com/users/smolkaj/following{/other_user}","gists_url":"https://api.github.com/users/smolkaj/gists{/gist_id}","starred_url":"https://api.github.com/users/smolkaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smolkaj/subscriptions","organizations_url":"https://api.github.com/users/smolkaj/orgs","repos_url":"https://api.github.com/users/smolkaj/repos","events_url":"https://api.github.com/users/smolkaj/events{/privacy}","received_events_url":"https://api.github.com/users/smolkaj/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T18:02:56Z","updated_at":"2015-12-17T18:02:56Z","body":"Actually, I think I am to blame for this. Look at my recent pull reques #454. If you recompile your example with `openflow-adherence = Strict` (the default prior to my pull request), I think you will get the correct table."}}