)]}'
{"dragonflow/controller/dnat_app.py":[{"author":{"_account_id":18903,"name":"Yuli","email":"stremovsky@gmail.com","username":"yuli"},"change_message_id":"ba254797df9d53ae092f479d55ffd6448b0232c1","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"FIP_GW_RESOLVING_STATUS \u003d \u0027resolving\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"EGRESS \u003d \u0027egress\u0027"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"INGRESS \u003d \u0027ingress\u0027"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class DNATApp(df_base_app.DFlowApp):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a3905b3_37819c4e","line":44,"range":{"start_line":42,"start_character":0,"end_line":44,"end_character":19},"updated":"2017-01-25 09:00:36.000000000","message":"These 2 variables can be moved to a file with constants. They can be reused by other applications too.","commit_id":"3178c400d662edeee3a7f1a8868d66d808fa94cc"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"dcdb06d967d1b6a23a9f61a3c53e3473fb8576d7","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"FIP_GW_RESOLVING_STATUS \u003d \u0027resolving\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"EGRESS \u003d \u0027egress\u0027"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"INGRESS \u003d \u0027ingress\u0027"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class DNATApp(df_base_app.DFlowApp):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_54195278","line":44,"range":{"start_line":42,"start_character":0,"end_line":44,"end_character":19},"in_reply_to":"5a3905b3_179ca068","updated":"2017-01-29 09:35:00.000000000","message":"@yuli, @xiao, can be done in a separate patch. Then you can take the resolving constant above too.","commit_id":"3178c400d662edeee3a7f1a8868d66d808fa94cc"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"3ab8d880b8a96386559ddb320d81554ade3c40f9","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"FIP_GW_RESOLVING_STATUS \u003d \u0027resolving\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"EGRESS \u003d \u0027egress\u0027"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"INGRESS \u003d \u0027ingress\u0027"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class DNATApp(df_base_app.DFlowApp):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a3905b3_179ca068","line":44,"range":{"start_line":42,"start_character":0,"end_line":44,"end_character":19},"in_reply_to":"5a3905b3_37819c4e","updated":"2017-01-25 09:06:59.000000000","message":"That is true, maybe we can do that in another patch? So we will have this patch serve for one purpose.","commit_id":"3178c400d662edeee3a7f1a8868d66d808fa94cc"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"dcdb06d967d1b6a23a9f61a3c53e3473fb8576d7","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        pkt \u003d packet.Packet(msg.data)"},{"line_number":88,"context_line":"        reply_pkt \u003d self._revert_nat_for_icmp_embedded_packet(pkt, INGRESS)"},{"line_number":89,"context_line":"        out_port \u003d msg.match.get(\u0027reg7\u0027)"},{"line_number":90,"context_line":"        self.send_packet(out_port, reply_pkt)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def egress_packet_in_handler(self, event):"},{"line_number":93,"context_line":"        msg \u003d event.msg"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_b41ef65c","line":90,"range":{"start_line":90,"start_character":0,"end_line":90,"end_character":45},"updated":"2017-01-29 09:35:00.000000000","message":"reg7 doesn\u0027t hold the ofport. It holds the internal port ID.","commit_id":"3178c400d662edeee3a7f1a8868d66d808fa94cc"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"e6547fdf8835663b79222d43e45019bbd5f60cd1","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        pkt \u003d packet.Packet(msg.data)"},{"line_number":88,"context_line":"        reply_pkt \u003d self._revert_nat_for_icmp_embedded_packet(pkt, INGRESS)"},{"line_number":89,"context_line":"        out_port \u003d msg.match.get(\u0027reg7\u0027)"},{"line_number":90,"context_line":"        self.send_packet(out_port, reply_pkt)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def egress_packet_in_handler(self, event):"},{"line_number":93,"context_line":"        msg \u003d event.msg"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_0549e68b","line":90,"range":{"start_line":90,"start_character":0,"end_line":90,"end_character":45},"in_reply_to":"3a461143_b41ef65c","updated":"2017-02-03 03:24:30.000000000","message":"I did the trick to set ofport to reg7 at line 271. I think it is the simplest way to get the ofport.","commit_id":"3178c400d662edeee3a7f1a8868d66d808fa94cc"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"dcdb06d967d1b6a23a9f61a3c53e3473fb8576d7","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        else:"},{"line_number":127,"context_line":"            embeded_ipv4_pkt.src \u003d ipv4_pkt.dst"},{"line_number":128,"context_line":"        embeded_data \u003d embeded_ipv4_pkt.serialize(None, None) + payload"},{"line_number":129,"context_line":"        icmp_pkt.data \u003d icmp.icmp._ICMP_TYPES[icmp_pkt.type]("},{"line_number":130,"context_line":"            data_len\u003dlen(embeded_data), data\u003dembeded_data)"},{"line_number":131,"context_line":"        # Re-calculate when encoding"},{"line_number":132,"context_line":"        icmp_pkt.csum \u003d 0"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_344a0656","line":129,"range":{"start_line":129,"start_character":34,"end_line":129,"end_character":45},"updated":"2017-01-29 09:35:00.000000000","message":"Isn\u0027t there a way to do this without accessing ryu\u0027s private members?","commit_id":"3178c400d662edeee3a7f1a8868d66d808fa94cc"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"e6547fdf8835663b79222d43e45019bbd5f60cd1","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        else:"},{"line_number":127,"context_line":"            embeded_ipv4_pkt.src \u003d ipv4_pkt.dst"},{"line_number":128,"context_line":"        embeded_data \u003d embeded_ipv4_pkt.serialize(None, None) + payload"},{"line_number":129,"context_line":"        icmp_pkt.data \u003d icmp.icmp._ICMP_TYPES[icmp_pkt.type]("},{"line_number":130,"context_line":"            data_len\u003dlen(embeded_data), data\u003dembeded_data)"},{"line_number":131,"context_line":"        # Re-calculate when encoding"},{"line_number":132,"context_line":"        icmp_pkt.csum \u003d 0"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_604b785a","line":129,"range":{"start_line":129,"start_character":34,"end_line":129,"end_character":45},"in_reply_to":"3a461143_344a0656","updated":"2017-02-03 03:24:30.000000000","message":"The alternative will be:\nif icmp_pkt.type \u003d\u003d icmp.ICMP_TIME_EXCEEDED:\n    icmp_pkt.data \u003d icmp.TimeExceeded()\nelif icmp_pkt.type \u003d\u003d icmp.ICMP_DEST_UNREACH:\n    icmp_pkt.data \u003d icmp.dest_unreach()\n\n\nNot sure which one is better, but I think this current version looks neater.","commit_id":"3178c400d662edeee3a7f1a8868d66d808fa94cc"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"dcdb06d967d1b6a23a9f61a3c53e3473fb8576d7","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        for icmp_type in (icmp.ICMP_DEST_UNREACH, icmp.ICMP_TIME_EXCEEDED):"},{"line_number":278,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IP,"},{"line_number":279,"context_line":"                                    ip_proto\u003din_proto.IPPROTO_ICMP,"},{"line_number":280,"context_line":"                                    icmpv4_type\u003dicmp_type,"},{"line_number":281,"context_line":"                                    ipv4_dst\u003dfloatingip.get_ip_address())"},{"line_number":282,"context_line":"            self.mod_flow("},{"line_number":283,"context_line":"                self.get_datapath(),"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_74764ea5","line":280,"range":{"start_line":280,"start_character":0,"end_line":280,"end_character":58},"updated":"2017-01-29 09:35:00.000000000","message":"Is this necessary? Don\u0027t we want NAT-mangling for all ICMP messages?","commit_id":"3178c400d662edeee3a7f1a8868d66d808fa94cc"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"e6547fdf8835663b79222d43e45019bbd5f60cd1","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        for icmp_type in (icmp.ICMP_DEST_UNREACH, icmp.ICMP_TIME_EXCEEDED):"},{"line_number":278,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IP,"},{"line_number":279,"context_line":"                                    ip_proto\u003din_proto.IPPROTO_ICMP,"},{"line_number":280,"context_line":"                                    icmpv4_type\u003dicmp_type,"},{"line_number":281,"context_line":"                                    ipv4_dst\u003dfloatingip.get_ip_address())"},{"line_number":282,"context_line":"            self.mod_flow("},{"line_number":283,"context_line":"                self.get_datapath(),"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_e040480a","line":280,"range":{"start_line":280,"start_character":0,"end_line":280,"end_character":58},"in_reply_to":"3a461143_74764ea5","updated":"2017-02-03 03:24:30.000000000","message":"According to rfc 5508, \n\nhttps://tools.ietf.org/html/rfc5508#page-15\n\nwe only need to do reverse NAT to embedded packet of ICMP error message. Besides, other icmp types, for instance icmp echo request, might not have the ip header in the embedded data.","commit_id":"3178c400d662edeee3a7f1a8868d66d808fa94cc"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"dcdb06d967d1b6a23a9f61a3c53e3473fb8576d7","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        action_inst \u003d [parser.OFPInstructionActions("},{"line_number":338,"context_line":"            ofproto.OFPIT_APPLY_ACTIONS, actions)]"},{"line_number":339,"context_line":"        for icmp_type in (icmp.ICMP_DEST_UNREACH, icmp.ICMP_TIME_EXCEEDED):"},{"line_number":340,"context_line":"            match \u003d self._get_dnat_egress_match(floatingip)"},{"line_number":341,"context_line":"            match.set_ip_proto(in_proto.IPPROTO_ICMP)"},{"line_number":342,"context_line":"            match.set_icmpv4_type(icmp_type)"},{"line_number":343,"context_line":"            self.mod_flow("},{"line_number":344,"context_line":"                self.get_datapath(),"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_346126d4","line":341,"range":{"start_line":340,"start_character":0,"end_line":341,"end_character":53},"updated":"2017-01-29 09:35:00.000000000","message":"Can\u0027t this be moved out of the loop?","commit_id":"3178c400d662edeee3a7f1a8868d66d808fa94cc"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"e6547fdf8835663b79222d43e45019bbd5f60cd1","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        action_inst \u003d [parser.OFPInstructionActions("},{"line_number":338,"context_line":"            ofproto.OFPIT_APPLY_ACTIONS, actions)]"},{"line_number":339,"context_line":"        for icmp_type in (icmp.ICMP_DEST_UNREACH, icmp.ICMP_TIME_EXCEEDED):"},{"line_number":340,"context_line":"            match \u003d self._get_dnat_egress_match(floatingip)"},{"line_number":341,"context_line":"            match.set_ip_proto(in_proto.IPPROTO_ICMP)"},{"line_number":342,"context_line":"            match.set_icmpv4_type(icmp_type)"},{"line_number":343,"context_line":"            self.mod_flow("},{"line_number":344,"context_line":"                self.get_datapath(),"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_e08208c8","line":341,"range":{"start_line":340,"start_character":0,"end_line":341,"end_character":53},"in_reply_to":"3a461143_346126d4","updated":"2017-02-03 03:24:30.000000000","message":"I can\u0027t do that, as the match object can\u0027t be used after serialization. or else code will hit:\n\nhttps://github.com/osrg/ryu/blob/37391bb5bddd9b3dbc5843c8e83f37383a2e2e2e/ryu/ofproto/ofproto_v1_3_parser.py#L1025","commit_id":"3178c400d662edeee3a7f1a8868d66d808fa94cc"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"dcdb06d967d1b6a23a9f61a3c53e3473fb8576d7","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        for icmp_type in (icmp.ICMP_DEST_UNREACH, icmp.ICMP_TIME_EXCEEDED):"},{"line_number":340,"context_line":"            match \u003d self._get_dnat_egress_match(floatingip)"},{"line_number":341,"context_line":"            match.set_ip_proto(in_proto.IPPROTO_ICMP)"},{"line_number":342,"context_line":"            match.set_icmpv4_type(icmp_type)"},{"line_number":343,"context_line":"            self.mod_flow("},{"line_number":344,"context_line":"                self.get_datapath(),"},{"line_number":345,"context_line":"                inst\u003daction_inst,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_1468aab8","line":342,"range":{"start_line":342,"start_character":0,"end_line":342,"end_character":44},"updated":"2017-01-29 09:35:00.000000000","message":"Same here re: matching icmp type","commit_id":"3178c400d662edeee3a7f1a8868d66d808fa94cc"},{"author":{"_account_id":22060,"name":"jingting","email":"kangjingting@huawei.com","username":"jingting"},"change_message_id":"448e93c5fb5f3a9edad672e34034346dd23adfff","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            self.send_packet(in_port, icmp_ttl_pkt)"},{"line_number":84,"context_line":"            return"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        pkt \u003d packet.Packet(msg.data)"},{"line_number":87,"context_line":"        reply_pkt \u003d self._revert_nat_for_icmp_embedded_packet(pkt, INGRESS)"},{"line_number":88,"context_line":"        out_port \u003d msg.match.get(\u0027reg7\u0027)"},{"line_number":89,"context_line":"        self.send_packet(out_port, reply_pkt)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def egress_packet_in_handler(self, event):"},{"line_number":92,"context_line":"        msg \u003d event.msg"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a430d35_6a05e4c0","line":89,"range":{"start_line":86,"start_character":0,"end_line":89,"end_character":45},"updated":"2017-02-04 10:42:33.000000000","message":"why not put this part into \"if msg.reason \u003d\u003d ofproto.OFPR_INVALID_TTL:\" and in that case there is no need for flows below to controller","commit_id":"380d0078713a5f37cdd3bfcc0605bb0d060c192d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"8c1958406b7789fb8ed39ce330f1ec098489b1ab","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            self.send_packet(in_port, icmp_ttl_pkt)"},{"line_number":84,"context_line":"            return"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        pkt \u003d packet.Packet(msg.data)"},{"line_number":87,"context_line":"        reply_pkt \u003d self._revert_nat_for_icmp_embedded_packet(pkt, INGRESS)"},{"line_number":88,"context_line":"        out_port \u003d msg.match.get(\u0027reg7\u0027)"},{"line_number":89,"context_line":"        self.send_packet(out_port, reply_pkt)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def egress_packet_in_handler(self, event):"},{"line_number":92,"context_line":"        msg \u003d event.msg"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a430d35_235ce2ec","line":89,"range":{"start_line":86,"start_character":0,"end_line":89,"end_character":45},"in_reply_to":"1a430d35_6a05e4c0","updated":"2017-02-05 08:27:19.000000000","message":"The if block is to generate icmp time exceed message, while here is to do revert nat to existing icmp error message. They are not same thing.","commit_id":"380d0078713a5f37cdd3bfcc0605bb0d060c192d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3427140e7342675143a9685de1f5247e5016aff0","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        else:"},{"line_number":125,"context_line":"            embeded_ipv4_pkt.src \u003d ipv4_pkt.dst"},{"line_number":126,"context_line":"        embeded_data \u003d embeded_ipv4_pkt.serialize(None, None) + payload"},{"line_number":127,"context_line":"        icmp_pkt.data \u003d icmp.icmp._ICMP_TYPES[icmp_pkt.type]("},{"line_number":128,"context_line":"            data_len\u003dlen(embeded_data), data\u003dembeded_data)"},{"line_number":129,"context_line":"        # Re-calculate when encoding"},{"line_number":130,"context_line":"        icmp_pkt.csum \u003d 0"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a430d35_03428610","line":127,"range":{"start_line":127,"start_character":24,"end_line":127,"end_character":60},"updated":"2017-02-05 08:32:28.000000000","message":"I still feel a bit uncomfortable about this. Maybe at least create a method?:\ndef _get_icmp_data_constructor(_type):\n    return icmp.icmp._ICMP_TYPES[_type]\n\nThis way we can easily change it if ryu change their API, or even ask ryu to make _ICMP_TYPES public at some point in the future?\n\nIf you agree that the change will be in place, maybe just do:\n    icmp_pkt.data.data \u003d embedded_data\n    icmp_pkt.csum \u003d 0\nand not create a new packet altogether?","commit_id":"380d0078713a5f37cdd3bfcc0605bb0d060c192d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d6ab0a7626de46d2b612259bdd791b88a104f8b6","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        else:"},{"line_number":125,"context_line":"            embeded_ipv4_pkt.src \u003d ipv4_pkt.dst"},{"line_number":126,"context_line":"        embeded_data \u003d embeded_ipv4_pkt.serialize(None, None) + payload"},{"line_number":127,"context_line":"        icmp_pkt.data \u003d icmp.icmp._ICMP_TYPES[icmp_pkt.type]("},{"line_number":128,"context_line":"            data_len\u003dlen(embeded_data), data\u003dembeded_data)"},{"line_number":129,"context_line":"        # Re-calculate when encoding"},{"line_number":130,"context_line":"        icmp_pkt.csum \u003d 0"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a430d35_6f4c0443","line":127,"range":{"start_line":127,"start_character":24,"end_line":127,"end_character":60},"in_reply_to":"1a430d35_03428610","updated":"2017-02-06 03:20:00.000000000","message":"I think it will work without creating new icmp data. I haven\u0027t thought this way when writing code. Thanks a lot!","commit_id":"380d0078713a5f37cdd3bfcc0605bb0d060c192d"}]}
