{"action":"created","issue":{"url":"https://api.github.com/repos/cozybit/authsae/issues/102","repository_url":"https://api.github.com/repos/cozybit/authsae","labels_url":"https://api.github.com/repos/cozybit/authsae/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/cozybit/authsae/issues/102/comments","events_url":"https://api.github.com/repos/cozybit/authsae/issues/102/events","html_url":"https://github.com/cozybit/authsae/pull/102","id":387526380,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1OTk2MjI1","number":102,"title":" Replace OPN_IGNR and CNF_IGNR with REQ_RJCT","user":{"login":"ilyacodesFB","id":33097525,"node_id":"MDQ6VXNlcjMzMDk3NTI1","avatar_url":"https://avatars3.githubusercontent.com/u/33097525?v=4","gravatar_id":"","url":"https://api.github.com/users/ilyacodesFB","html_url":"https://github.com/ilyacodesFB","followers_url":"https://api.github.com/users/ilyacodesFB/followers","following_url":"https://api.github.com/users/ilyacodesFB/following{/other_user}","gists_url":"https://api.github.com/users/ilyacodesFB/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyacodesFB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyacodesFB/subscriptions","organizations_url":"https://api.github.com/users/ilyacodesFB/orgs","repos_url":"https://api.github.com/users/ilyacodesFB/repos","events_url":"https://api.github.com/users/ilyacodesFB/events{/privacy}","received_events_url":"https://api.github.com/users/ilyacodesFB/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-04T23:31:34Z","updated_at":"2018-12-05T14:08:08Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/cozybit/authsae/pulls/102","html_url":"https://github.com/cozybit/authsae/pull/102","diff_url":"https://github.com/cozybit/authsae/pull/102.diff","patch_url":"https://github.com/cozybit/authsae/pull/102.patch"},"body":"Currently, in cases where we receive open or confirm frames with mismatched link IDs, we ignore them, using non-standard events `OPN_IGNR` and `CNF_IGNR`. This leads to a deadlock if a device `A` loses its link and tries to re-establish: device `B` thinks it's still ESTAB and ignores the new attempts to peer, so device `A` will never reconnect.\r\n\r\nIn order to avoid this deadlock, we instead will reject these frames with the event `REQ_RJCT`, which is specified in the standard (802.11-2016 sections 14.3.6.2 and 14.3.7.2) as the way to reject incompatible mesh peering frames. This is not strictly correct – we should actually create a new mesh peering instance and start its state machine (section 14.3.5). However, we don't currently currently support multiple mesh peering instances, so this is a temporary workaround.\r\n\r\nAdditionally, in the standard, the `REQ_RJCT` event is only clearly defined for the `IDLE` state (section 14.4.3, and table+figure 14.2 for MPM, table+figure 14-3 for AMPE), but in practice, it appears to make sense to process it in all states, similarly to `OPN_RJCT` and `CNF_RJCT` (after all, it too is a type of rejection of an incoming mesh peering frame).\r\n\r\nA new test is also added for this case, and stability of other tests is improved by adding a cleanup step before/after test execution.\r\n\r\n# Testing:\r\nBefore change:\r\n```\r\n$ sudo tests/run_tests.sh \r\ntest001.sh establishes an encrypted peer link...PASS\r\ntest002.sh exchanges igtk when pmf=1...PASS\r\ntest003.sh mixed HT/non-HT neighbors can peer.../tmp/authsae-1.log:nlerror, cmd 29, seq 1543964644: Invalid argument\r\n/tmp/authsae-2.log:nlerror, cmd 29, seq 1543964644: Invalid argument\r\n/tmp/authsae-3.log:nlerror, cmd 29, seq 1543964644: Invalid argument\r\nset meshconf failed\r\nFAIL\r\ntest004.sh establishes peer link without encryption...PASS\r\ntest005.sh user mpm interoperates with kernel mpm...PASS\r\ntest006.sh both ends close peer link when one side deletes its peer...PASS\r\ntest007.sh HT40 works...PASS\r\ntest008.sh VHT80 works...PASS\r\ntest009.sh VHT80 mesh creates VHT STAs...PASS\r\ntest010.sh re-ESTABs if one side is force-restarted without sending a PCLOSE...FAIL: smesh0 failed to establish a link\r\nFAIL\r\n```\r\n\r\n**After change:**\r\n```\r\n$ sudo tests/run_tests.sh \r\ntest001.sh establishes an encrypted peer link...PASS\r\ntest002.sh exchanges igtk when pmf=1...PASS\r\ntest003.sh mixed HT/non-HT neighbors can peer.../tmp/authsae-1.log:nlerror, cmd 29, seq 1543964782: Invalid argument\r\n/tmp/authsae-2.log:nlerror, cmd 29, seq 1543964782: Invalid argument\r\n/tmp/authsae-3.log:nlerror, cmd 29, seq 1543964782: Invalid argument\r\nset meshconf failed\r\nFAIL\r\ntest004.sh establishes peer link without encryption...PASS\r\ntest005.sh user mpm interoperates with kernel mpm...PASS\r\ntest006.sh both ends close peer link when one side deletes its peer...PASS\r\ntest007.sh HT40 works...PASS\r\ntest008.sh VHT80 works...PASS\r\ntest009.sh VHT80 mesh creates VHT STAs...PASS\r\ntest010.sh re-ESTABs if one side is restarted without closing...PASS\r\n```"},"comment":{"url":"https://api.github.com/repos/cozybit/authsae/issues/comments/444497007","html_url":"https://github.com/cozybit/authsae/pull/102#issuecomment-444497007","issue_url":"https://api.github.com/repos/cozybit/authsae/issues/102","id":444497007,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDQ5NzAwNw==","user":{"login":"bcopeland","id":199836,"node_id":"MDQ6VXNlcjE5OTgzNg==","avatar_url":"https://avatars0.githubusercontent.com/u/199836?v=4","gravatar_id":"","url":"https://api.github.com/users/bcopeland","html_url":"https://github.com/bcopeland","followers_url":"https://api.github.com/users/bcopeland/followers","following_url":"https://api.github.com/users/bcopeland/following{/other_user}","gists_url":"https://api.github.com/users/bcopeland/gists{/gist_id}","starred_url":"https://api.github.com/users/bcopeland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcopeland/subscriptions","organizations_url":"https://api.github.com/users/bcopeland/orgs","repos_url":"https://api.github.com/users/bcopeland/repos","events_url":"https://api.github.com/users/bcopeland/events{/privacy}","received_events_url":"https://api.github.com/users/bcopeland/received_events","type":"User","site_admin":false},"created_at":"2018-12-05T14:08:08Z","updated_at":"2018-12-05T14:08:08Z","author_association":"CONTRIBUTOR","body":"This looks fine, but all of the useful motivation and explanatory text in the pull request comment will be lost forever when this is merged.  IMHO you should copy it all into the \"Remove OPN_IGNR and CNF_IGNR, add REQ_RJCT\" commit log."}}
{"actor":{"display_login":"bcopeland"}}