def METHOD_NAME(self, iff, addr):
    # type: (str, str) -> None
    self.invalidate_cache()
    the_addr, the_msk_b = (addr.split("/") + ["32"])[:2]
    the_msk = itom(int(the_msk_b))
    the_rawaddr = atol(the_addr)
    the_net = the_rawaddr & the_msk
    for i, route in enumerate(self.routes):
        net, msk, gw, iface, addr, metric = route
        if iff != iface:
            continue
        if gw == '0.0.0.0':
            self.routes[i] = (the_net, the_msk, gw, iface, the_addr, metric)  # noqa: E501
        else:
            self.routes[i] = (net, msk, gw, iface, the_addr, metric)
    conf.netcache.flush()