)]}'
{"neutron/agent/linux/openvswitch_firewall/firewall.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0940ddfe0ea88d8989cdf604c718940f2129326b","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    @property"},{"line_number":117,"context_line":"    def all_allowed_macs(self):"},{"line_number":118,"context_line":"        macs \u003d [item[0] for item in self.allowed_pairs_v4.union("},{"line_number":119,"context_line":"            self.allowed_pairs_v6)]"},{"line_number":120,"context_line":"        macs.append(self.mac)"},{"line_number":121,"context_line":"        return set(macs)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f231b9d_4039c9a1","line":118,"range":{"start_line":118,"start_character":15,"end_line":118,"end_character":16},"updated":"2017-06-15 10:10:47.000000000","message":"You can directly create a set here by replacing [ with {, then just macs.add(self.mac)","commit_id":"5b28cb313d4fafc382c665faffb3eadb0eddf463"},{"author":{"_account_id":10518,"name":"Jesse","email":"jesse@easystack.cn","username":"jesse"},"change_message_id":"99fdd68562804dac3a99e54a94381400be6ba9e9","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    @property"},{"line_number":117,"context_line":"    def all_allowed_macs(self):"},{"line_number":118,"context_line":"        macs \u003d [item[0] for item in self.allowed_pairs_v4.union("},{"line_number":119,"context_line":"            self.allowed_pairs_v6)]"},{"line_number":120,"context_line":"        macs.append(self.mac)"},{"line_number":121,"context_line":"        return set(macs)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f231b9d_75a22dfe","line":118,"range":{"start_line":118,"start_character":15,"end_line":118,"end_character":16},"in_reply_to":"7f231b9d_4039c9a1","updated":"2017-06-16 03:08:13.000000000","message":"Done","commit_id":"5b28cb313d4fafc382c665faffb3eadb0eddf463"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0940ddfe0ea88d8989cdf604c718940f2129326b","unresolved":false,"context_lines":[{"line_number":801,"context_line":"                reg_port\u003dport.ofport,"},{"line_number":802,"context_line":"                dl_type\u003dconstants.ETHERTYPE_IP,"},{"line_number":803,"context_line":"                dl_dst\u003dmac_addr,"},{"line_number":804,"context_line":"                nw_dst\u003dip_addr,"},{"line_number":805,"context_line":"                ct_state\u003dovsfw_consts.OF_STATE_NOT_TRACKED,"},{"line_number":806,"context_line":"                actions\u003d\u0027ct(table\u003d{:d},zone\u003dNXM_NX_REG{:d}[0..15])\u0027.format("},{"line_number":807,"context_line":"                    ovs_consts.RULES_INGRESS_TABLE,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f231b9d_c0b39997","line":804,"range":{"start_line":804,"start_character":16,"end_line":804,"end_character":31},"updated":"2017-06-15 10:10:47.000000000","message":"Why do we need to filter the ip here? We control the egress arps so there is no way switch can learn custom ip from instance if it\u0027s not allowed in address pairs, no?","commit_id":"5b28cb313d4fafc382c665faffb3eadb0eddf463"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"1c25bce0f0b5b25646e294c3dd89711f146b82f4","unresolved":false,"context_lines":[{"line_number":801,"context_line":"                reg_port\u003dport.ofport,"},{"line_number":802,"context_line":"                dl_type\u003dconstants.ETHERTYPE_IP,"},{"line_number":803,"context_line":"                dl_dst\u003dmac_addr,"},{"line_number":804,"context_line":"                nw_dst\u003dip_addr,"},{"line_number":805,"context_line":"                ct_state\u003dovsfw_consts.OF_STATE_NOT_TRACKED,"},{"line_number":806,"context_line":"                actions\u003d\u0027ct(table\u003d{:d},zone\u003dNXM_NX_REG{:d}[0..15])\u0027.format("},{"line_number":807,"context_line":"                    ovs_consts.RULES_INGRESS_TABLE,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f231b9d_eea307ff","line":804,"range":{"start_line":804,"start_character":16,"end_line":804,"end_character":31},"in_reply_to":"7f231b9d_95a149fb","updated":"2017-06-16 07:27:12.000000000","message":"I was more thinking that IP spoofing is already protected by egress rules, so there can\u0027t be inbound packets if user sets custom IP on the instance.","commit_id":"5b28cb313d4fafc382c665faffb3eadb0eddf463"},{"author":{"_account_id":10518,"name":"Jesse","email":"jesse@easystack.cn","username":"jesse"},"change_message_id":"99fdd68562804dac3a99e54a94381400be6ba9e9","unresolved":false,"context_lines":[{"line_number":801,"context_line":"                reg_port\u003dport.ofport,"},{"line_number":802,"context_line":"                dl_type\u003dconstants.ETHERTYPE_IP,"},{"line_number":803,"context_line":"                dl_dst\u003dmac_addr,"},{"line_number":804,"context_line":"                nw_dst\u003dip_addr,"},{"line_number":805,"context_line":"                ct_state\u003dovsfw_consts.OF_STATE_NOT_TRACKED,"},{"line_number":806,"context_line":"                actions\u003d\u0027ct(table\u003d{:d},zone\u003dNXM_NX_REG{:d}[0..15])\u0027.format("},{"line_number":807,"context_line":"                    ovs_consts.RULES_INGRESS_TABLE,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f231b9d_95a149fb","line":804,"range":{"start_line":804,"start_character":16,"end_line":804,"end_character":31},"in_reply_to":"7f231b9d_c0b39997","updated":"2017-06-16 03:08:13.000000000","message":"Yes, you are right.\nI think there is no need to check dl_dst because dl_dst has check in table\u003d0 and table\u003d73, right?","commit_id":"5b28cb313d4fafc382c665faffb3eadb0eddf463"}],"neutron/tests/functional/agent/test_firewall.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5ce2f76a0cf03fd0bb2b2fa3a12e2e6dbbb5df71","unresolved":false,"context_lines":[{"line_number":428,"context_line":"        self.tester.vm_ip_cidr \u003d allowed_ip"},{"line_number":429,"context_line":"        self.tester.flush_arp_tables()"},{"line_number":430,"context_line":"        self.tester.assert_no_connection(protocol\u003dself.tester.ICMP,"},{"line_number":431,"context_line":"                                         direction\u003dself.tester.INGRESS)"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"    def test_arp_is_allowed(self):"},{"line_number":434,"context_line":"        self.tester.assert_connection(protocol\u003dself.tester.ARP,"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f1a1f67_d47d116f","line":431,"updated":"2017-07-13 08:24:57.000000000","message":"I\u0027d also add here an egress test connection. If we change mac inside of instance, it shouldn\u0027t be able to talk to anyone, right?\n\n self.tester.assert_no_connection(protocol\u003dself.tester.ICMP, \n                                  direction\u003dself.tester.EGRESS)","commit_id":"3748fd3a0fc8d198481f27c4ac1155be43a58cac"},{"author":{"_account_id":10518,"name":"Jesse","email":"jesse@easystack.cn","username":"jesse"},"change_message_id":"494edbc2104a696942ae8b7cab482cb710da71b9","unresolved":false,"context_lines":[{"line_number":428,"context_line":"        self.tester.vm_ip_cidr \u003d allowed_ip"},{"line_number":429,"context_line":"        self.tester.flush_arp_tables()"},{"line_number":430,"context_line":"        self.tester.assert_no_connection(protocol\u003dself.tester.ICMP,"},{"line_number":431,"context_line":"                                         direction\u003dself.tester.INGRESS)"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"    def test_arp_is_allowed(self):"},{"line_number":434,"context_line":"        self.tester.assert_connection(protocol\u003dself.tester.ARP,"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f1a1f67_0f8a541a","line":431,"in_reply_to":"1f1a1f67_af2c8047","updated":"2017-07-13 09:00:57.000000000","message":"Yes, I will add this kinds of testing. :)","commit_id":"3748fd3a0fc8d198481f27c4ac1155be43a58cac"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"eefc13e737a095e8fec832627cc822aae51f88ad","unresolved":false,"context_lines":[{"line_number":428,"context_line":"        self.tester.vm_ip_cidr \u003d allowed_ip"},{"line_number":429,"context_line":"        self.tester.flush_arp_tables()"},{"line_number":430,"context_line":"        self.tester.assert_no_connection(protocol\u003dself.tester.ICMP,"},{"line_number":431,"context_line":"                                         direction\u003dself.tester.INGRESS)"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"    def test_arp_is_allowed(self):"},{"line_number":434,"context_line":"        self.tester.assert_connection(protocol\u003dself.tester.ARP,"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f1a1f67_af2c8047","line":431,"in_reply_to":"1f1a1f67_cf21fca1","updated":"2017-07-13 08:58:08.000000000","message":"At this point mac is set to not_allowed_mac, which should not be allowed.","commit_id":"3748fd3a0fc8d198481f27c4ac1155be43a58cac"},{"author":{"_account_id":10518,"name":"Jesse","email":"jesse@easystack.cn","username":"jesse"},"change_message_id":"7c7d068be5e5d10cf5b6f524d20c09a16105f377","unresolved":false,"context_lines":[{"line_number":428,"context_line":"        self.tester.vm_ip_cidr \u003d allowed_ip"},{"line_number":429,"context_line":"        self.tester.flush_arp_tables()"},{"line_number":430,"context_line":"        self.tester.assert_no_connection(protocol\u003dself.tester.ICMP,"},{"line_number":431,"context_line":"                                         direction\u003dself.tester.INGRESS)"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"    def test_arp_is_allowed(self):"},{"line_number":434,"context_line":"        self.tester.assert_connection(protocol\u003dself.tester.ARP,"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f1a1f67_cf21fca1","line":431,"in_reply_to":"1f1a1f67_d47d116f","updated":"2017-07-13 08:51:33.000000000","message":"Actually using another MAC and IP in VM should talk to outside if security-group is allowed because we use allowed_address_pairs for this MAC and IP.","commit_id":"3748fd3a0fc8d198481f27c4ac1155be43a58cac"}]}
