def _map_arp_fields(ofctl):
    """Translate nw_src/ipv4_src and nw_dst/ipv4_dst in the special case of
    an ARP match.

    At the point this function is called, nw_src/nw_dst has already been
    renamed to ipv4_src/ipv4_dst.
    """
    if 'ipv4_src' in ofctl and 'arp_spa' not in ofctl:
        ofctl['arp_spa'] = ofctl.pop('ipv4_src')
    if 'ipv4_dst' in ofctl and 'arp_tpa' not in ofctl:
        ofctl['arp_tpa'] = ofctl.pop('ipv4_dst')
